[maemo-commits] [maemo-commits] r13562 - in projects/haf/trunk/hildon-desktop: . src

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Mon Sep 3 17:11:09 EEST 2007
Author: lucasr
Date: 2007-09-03 17:11:07 +0300 (Mon, 03 Sep 2007)
New Revision: 13562

Modified:
   projects/haf/trunk/hildon-desktop/ChangeLog
   projects/haf/trunk/hildon-desktop/src/hd-config.h
   projects/haf/trunk/hildon-desktop/src/hd-select-plugins-dialog.c
Log:
2007-09-03  Lucas Rocha  <lucas.rocha at nokia.com>

	* src/hd-select-plugins-dialog.c (hd_select_plugins_dialog_get_store),
	src/hd-config.h: take the text domain from the plugin desktop file
	into account when defining the localized name in the select plugins
	dialog. Fixes: NB#67871.


Modified: projects/haf/trunk/hildon-desktop/ChangeLog
===================================================================
--- projects/haf/trunk/hildon-desktop/ChangeLog	2007-09-03 11:31:12 UTC (rev 13561)
+++ projects/haf/trunk/hildon-desktop/ChangeLog	2007-09-03 14:11:07 UTC (rev 13562)
@@ -1,3 +1,10 @@
+2007-09-03  Lucas Rocha  <lucas.rocha at nokia.com>
+
+	* src/hd-select-plugins-dialog.c (hd_select_plugins_dialog_get_store),
+	src/hd-config.h: take the text domain from the plugin desktop file
+	into account when defining the localized name in the select plugins
+	dialog. Fixes: NB#67871.
+
 2007-09-03 Johan Bilien  <johan.bilien at nokia.com>
 
 	* data/restore-menu.sh: added script to restore default

Modified: projects/haf/trunk/hildon-desktop/src/hd-config.h
===================================================================
--- projects/haf/trunk/hildon-desktop/src/hd-config.h	2007-09-03 11:31:12 UTC (rev 13561)
+++ projects/haf/trunk/hildon-desktop/src/hd-config.h	2007-09-03 14:11:07 UTC (rev 13562)
@@ -57,6 +57,7 @@
 #define HD_PLUGIN_CONFIG_KEY_NAME           "Name"
 #define HD_PLUGIN_CONFIG_KEY_TYPE           "Type"
 #define HD_PLUGIN_CONFIG_KEY_PATH           "X-Path"
+#define HD_PLUGIN_CONFIG_KEY_TEXT_DOMAIN    "X-Text-Domain"
 #define HD_PLUGIN_CONFIG_KEY_MANDATORY      "Mandatory"
 
 #define HD_PLUGIN_CONFIG_KEY_HOME_APPLET    "X-home-applet"

Modified: projects/haf/trunk/hildon-desktop/src/hd-select-plugins-dialog.c
===================================================================
--- projects/haf/trunk/hildon-desktop/src/hd-select-plugins-dialog.c	2007-09-03 11:31:12 UTC (rev 13561)
+++ projects/haf/trunk/hildon-desktop/src/hd-select-plugins-dialog.c	2007-09-03 14:11:07 UTC (rev 13562)
@@ -167,6 +167,7 @@
   {
     gchar *desktop_path = NULL;
     gchar *name = NULL;
+    gchar *text_domain = NULL;
     GList *active;
     error = NULL;
 
@@ -193,11 +194,10 @@
       return NULL;
     }
 
-    name = g_key_file_get_locale_string (keyfile,
-                                         HD_PLUGIN_CONFIG_GROUP,
-                                         HD_PLUGIN_CONFIG_KEY_NAME,
-                                         NULL /* current locale */,
-                                         &error);
+    name = g_key_file_get_string (keyfile,
+                                  HD_PLUGIN_CONFIG_GROUP,
+                                  HD_PLUGIN_CONFIG_KEY_NAME,
+                                  &error);
 
     if (error)
     {
@@ -217,12 +217,18 @@
 
     gtk_list_store_append (GTK_LIST_STORE (store), &iter);
 
+    text_domain = g_key_file_get_string (keyfile, 
+		                         HD_PLUGIN_CONFIG_GROUP,
+				         HD_PLUGIN_CONFIG_KEY_TEXT_DOMAIN, 
+					 NULL);
+
     gtk_list_store_set (GTK_LIST_STORE (store), &iter, 
-                        HD_SPD_COLUMN_NAME, _(name),
+                        HD_SPD_COLUMN_NAME, (text_domain ? dgettext(text_domain, name) : _(name)),
                         HD_SPD_COLUMN_ACTIVE, active,
                         HD_SPD_COLUMN_DESKTOP_FILE, desktop_path,
                         -1);
 
+    g_free(text_domain);
     g_free (name);
   }
 


More information about the maemo-commits mailing list