[network-manager-netbook] Initialize gettext (doh!).



commit 0d14b44ff83e1246abab4b85352811248e5c3d50
Author: Tambet Ingo <tambet gmail com>
Date:   Fri Aug 28 22:43:06 2009 +0300

    Initialize gettext (doh!).

 src/Makefile.am |    1 +
 src/main.c      |    8 ++++++++
 2 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/src/Makefile.am b/src/Makefile.am
index 838be1d..9091083 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -10,6 +10,7 @@ network_manager_netbook_CPPFLAGS = \
 	-I${top_srcdir}/src/wireless-security \
 	-DUIDIR=\""$(uidir)"\" \
 	-DICON_PATH=\""$(pkgdatadir)/icons/"\" \
+	-DNMNLOCALEDIR=\"$(datadir)/locale\" \
 	$(NULL)
 
 network_manager_netbook_LDADD = \
diff --git a/src/main.c b/src/main.c
index 1ea55f5..2f27b5e 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1,5 +1,10 @@
 /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
 
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <glib/gi18n.h>
 #include <gtk/gtk.h>
 #include "nmn-applet.h"
 #include "nmn-icon-cache.h"
@@ -28,7 +33,10 @@ main (int argc, char *argv[])
     GtkStatusIcon *status_icon;
     GtkWidget *plug;
 
+    bindtextdomain (GETTEXT_PACKAGE, NMNLOCALEDIR);
+    bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
     gtk_init (&argc, &argv);
+    textdomain (GETTEXT_PACKAGE);
 
     /* Force to the moblin theme */
     gtk_settings_set_string_property (gtk_settings_get_default (),



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]