[tracker] tracker-preferences: Enable gettext translations



commit b39f7a3b11771cbf83b9e2a977a5154bdaf878cf
Author: Michael Biebl <biebl debian org>
Date:   Fri Mar 4 04:46:38 2011 +0100

    tracker-preferences: Enable gettext translations
    
    While at it, clean up unused defines.

 src/tracker-preferences/Makefile.am              |    4 +---
 src/tracker-preferences/config.vapi              |    3 ++-
 src/tracker-preferences/tracker-preferences.vala |    5 +++++
 3 files changed, 8 insertions(+), 4 deletions(-)
---
diff --git a/src/tracker-preferences/Makefile.am b/src/tracker-preferences/Makefile.am
index e380685..78b6590 100644
--- a/src/tracker-preferences/Makefile.am
+++ b/src/tracker-preferences/Makefile.am
@@ -20,9 +20,7 @@ AM_CPPFLAGS =                                          \
 	-I$(top_srcdir)/src                            \
 	-I$(top_builddir)/src                          \
 	-DTRACKER_DATADIR=\""$(datadir)/tracker"\"     \
-	-DTRACKER_LOCALEDIR=\""$(localedir)"\"         \
-	-DTRACKER_BINDIR=\""$(bindir)"\"               \
-	-DTRACKER_LIBEXECDIR=\""$(libexecdir)"\"       \
+	-DLOCALEDIR=\""$(localedir)"\"                 \
 	-DGETTEXT_PACKAGE=\"$(GETTEXT_PACKAGE)\"       \
 	$(TRACKER_PREFERENCES_CFLAGS)
 
diff --git a/src/tracker-preferences/config.vapi b/src/tracker-preferences/config.vapi
index e0ebb0d..da2a171 100644
--- a/src/tracker-preferences/config.vapi
+++ b/src/tracker-preferences/config.vapi
@@ -1,3 +1,4 @@
 [CCode (cheader_filename = "config.h")]
 public const string TRACKER_DATADIR;
-public const bool HAVE_TRACKER_STATUS_ICON;
+public const string GETTEXT_PACKAGE;
+public const string LOCALEDIR;
diff --git a/src/tracker-preferences/tracker-preferences.vala b/src/tracker-preferences/tracker-preferences.vala
index 0ba15ef..aba7bd6 100644
--- a/src/tracker-preferences/tracker-preferences.vala
+++ b/src/tracker-preferences/tracker-preferences.vala
@@ -331,6 +331,10 @@ setup_standard_treeview (TreeView view, string title)
 static int main (string[] args) {
 	Gtk.init (ref args);
 
+	Intl.bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
+	Intl.bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
+	Intl.textdomain (GETTEXT_PACKAGE);
+
 	try {
 		config = new Config.with_domain ("tracker-miner-fs");
 
@@ -399,6 +403,7 @@ static int main (string[] args) {
 		builder.connect_signals (null);
 
 		window.show_all ();
+
 		Gtk.main ();
 	} catch (Error e) {
 		stderr.printf ("Could not load UI: %s\n", e.message);



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