all repos — openbox @ 2aff07a250930db7e0eb69dd6cd776333fcb8b9a

openbox fork - make it a bit more like ryudo

show a warning if we fail to set the locale
Dana Jansens danakj@orodu.net
commit

2aff07a250930db7e0eb69dd6cd776333fcb8b9a

parent

2594b98ce4d4ca13cb5ceb9839d6160d274b2c44

1 files changed, 6 insertions(+), 1 deletions(-)

jump to
M src/main.ccsrc/main.cc

@@ -13,6 +13,10 @@ #ifdef HAVE_LOCALE_H

# include <locale.h> #endif // HAVE_LOCALE_H +#ifdef HAVE_STDIO_H +# include <stdio.h> +#endif // HAVE_STDIO_H + #include "gettext.h" }

@@ -20,7 +24,8 @@ #include "openbox.hh"

int main(int argc, char **argv) { // initialize the locale - setlocale(LC_ALL, ""); + if (!setlocale(LC_ALL, "")) + printf("Couldn't set locale from environment.\n"); bindtextdomain(PACKAGE, LOCALEDIR); bind_textdomain_codeset(PACKAGE, "UTF-8"); textdomain(PACKAGE);