From f1b055e62acfa44ca52eb74c81abbac00328aa40 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Thu, 1 Mar 2007 07:04:03 +0000 Subject: fixing gettext issues --- ChangeLog | 3 +++ configure.ac | 12 +----------- src/common/helper.c | 2 +- src/core/main.c | 8 +++++++- 4 files changed, 12 insertions(+), 13 deletions(-) diff --git a/ChangeLog b/ChangeLog index b7507762..e22d9e9d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +Thu Mar 1 00:03:44 MST 2007 + Fixing issues with gettext (wrong path). + Sat Feb 24 15:43:14 MST 2007 Improved performance of statistics querying code (O(n^2) to O(n) where n is number of stats). diff --git a/configure.ac b/configure.ac index afe05efb..9a717b4e 100644 --- a/configure.ac +++ b/configure.ac @@ -317,17 +317,7 @@ if test x$have_libgksu2 = xyes ; then fi - - - - - -# We define the paths here, because MinGW/GCC expands paths -# passed through the command line ("-DDATADIR=..."). This would -# lead to hard-coded paths ("C:\mingw\mingw\bin...") that do -# not contain the actual installation. -AC_DEFINE_DIR([PACKAGE_DATA_DIR], [rootdatadir/gnunet-gtk], [The directory for installing read-only architecture-independent data]) -AC_DEFINE_DIR([PACKAGE_LOCALE_DIR], [rootdatadir/locale], [gettext catalogs]) +AC_DEFINE_DIR([PACKAGE_DATA], [datarootdir], [The directory for installing read-only architecture-independent data]) # Set PACKAGE_SOURCE_DIR in config.h. diff --git a/src/common/helper.c b/src/common/helper.c index ad4f3e71..bb268ce8 100644 --- a/src/common/helper.c +++ b/src/common/helper.c @@ -471,7 +471,7 @@ void gnunetgtk_notify(int type, va_end(arg); libnotify = notify_notification_new("gnunet-gtk", msg, - PACKAGE_DATA_DIR"/gnunet-gtk-notify.png", + PACKAGE_DATA "/gnunet-gtk/gnunet-gtk-notify.png", NULL); FREE(msg); notify_notification_set_timeout(libnotify, libnotify_expire_timeout); diff --git a/src/core/main.c b/src/core/main.c index fc762980..aa1c0938 100644 --- a/src/core/main.c +++ b/src/core/main.c @@ -78,6 +78,9 @@ int main(int argc, int i; struct GE_Context * ectx; struct GC_Configuration * cfg; +#if ENABLE_NLS + char * path; +#endif #ifdef WINDOWS SetCursor(LoadCursor(NULL, IDC_APPSTARTING)); @@ -102,7 +105,10 @@ int main(int argc, #endif #if ENABLE_NLS - BINDTEXTDOMAIN("gnunet-gtk", PACKAGE_LOCALE_DIR); + setlocale (LC_ALL, ""); + path = os_get_installation_path(IPK_LOCALEDIR); + BINDTEXTDOMAIN("gnunet-gtk", path); + FREE(path); textdomain("gnunet-gtk"); bind_textdomain_codeset("GNUnet", "UTF-8"); bind_textdomain_codeset("gnunet-gtk", "UTF-8"); -- cgit v1.2.3