summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Arts <stephan@xfce.org>2009-02-20 18:57:23 +0000
committerStephan Arts <stephan@xfce.org>2009-02-20 18:57:23 +0000
commit87ba74729345f7e92b92ff5fd930cdd581413cbc (patch)
treed5c0ffbd95e58299a4f3df4204ec763a8771c81d
parentf35ecf2b617b54e159c2e63b19b2ee6370306c63 (diff)
downloadxfconf-87ba74729345f7e92b92ff5fd930cdd581413cbc.tar.gz
Fix Bug #4622, applied patch by Mike Massonnet
<mike.massonnet@gmail.com> (with changes) (Old svn revision: 29522)
-rw-r--r--configure.ac.in5
-rw-r--r--xfconf-query/main.c15
2 files changed, 12 insertions, 8 deletions
diff --git a/configure.ac.in b/configure.ac.in
index c315f2e..48c5437 100644
--- a/configure.ac.in
+++ b/configure.ac.in
@@ -40,11 +40,12 @@ AC_PROG_LN_S
dnl check for standard header files
AC_HEADER_STDC
-AC_CHECK_HEADERS([errno.h fcntl.h grp.h \
+AC_CHECK_HEADERS([errno.h fcntl.h grp.h locale.h \
signal.h stdlib.h string.h \
sys/stat.h sys/time.h sys/types.h sys/wait.h \
unistd.h])
-dnl AC_CHECK_FUNCS([fdwalk getdtablesize setsid sysconf])
+dnl AC_CHECK_FUNCS([fdwalk getdtablesize setlocale setsid sysconf])
+AC_CHECK_FUNCS([setlocale])
dnl version information
XFCONF_VERSION=xfconf_version
diff --git a/xfconf-query/main.c b/xfconf-query/main.c
index e4e0dfa..c6a176e 100644
--- a/xfconf-query/main.c
+++ b/xfconf-query/main.c
@@ -49,14 +49,14 @@
#include <glib.h>
-#if defined(GETTEXT_PACKAGE)
-#include <glib/gi18n-lib.h>
-#else
-#include <glib/gi18n.h>
-#endif
-
#include <libxfce4util/libxfce4util.h>
+#ifdef ENABLE_NLS
+#ifdef HAVE_LOCALE_H
+#include <locale.h>
+#endif
+#endif
+
#include "xfconf-gvaluefuncs.h"
#include "xfconf-common-private.h"
#include "xfconf/xfconf.h"
@@ -256,6 +256,9 @@ main(int argc, char **argv)
gint fd = -1;
GOptionContext *context;
+#ifdef ENABLE_NLS
+ setlocale (LC_ALL, "");
+#endif
xfce_textdomain (GETTEXT_PACKAGE, LOCALEDIR, "UTF-8");
g_type_init();