← Back to team overview

ayatana-commits team mailing list archive

[Merge] lp:~ted/indicator-session/setlocale into lp:indicator-session

 

Ted Gould has proposed merging lp:~ted/indicator-session/setlocale into lp:indicator-session.

Requested reviews:
    Indicator Applet Developers (indicator-applet-developers)

Adding the calls to init gettext on the start of all the services and the gtk-logout-helper.
-- 
https://code.launchpad.net/~ted/indicator-session/setlocale/+merge/11825
Your team ayatana-commits is subscribed to branch lp:indicator-session.
=== modified file 'src/gtk-dialog/gtk-logout-helper.c'
--- src/gtk-dialog/gtk-logout-helper.c	2009-09-10 20:59:38 +0000
+++ src/gtk-dialog/gtk-logout-helper.c	2009-09-15 20:45:56 +0000
@@ -21,7 +21,7 @@
 with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
-
+#include <config.h>
 #include <glib.h>
 #include <gtk/gtk.h>
 #include <dbus/dbus-glib.h>
@@ -121,6 +121,12 @@
 {
 	gtk_init(&argc, &argv);
 
+	/* Setting up i18n and gettext.  Apparently, we need
+	   all of these. */
+	setlocale (LC_ALL, "");
+	bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR);
+	textdomain (GETTEXT_PACKAGE);
+
 	GError * error = NULL;
 	GOptionContext * context = g_option_context_new(" - logout of the current session");
 	g_option_context_add_main_entries(context, options, "gtk-logout-helper");

=== modified file 'src/session-service.c'
--- src/session-service.c	2009-09-10 22:05:42 +0000
+++ src/session-service.c	2009-09-15 20:34:14 +0000
@@ -21,6 +21,7 @@
 with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
+#include <config.h>
 
 #include <glib/gi18n.h>
 
@@ -282,6 +283,12 @@
 {
     g_type_init();
 
+	/* Setting up i18n and gettext.  Apparently, we need
+	   all of these. */
+	setlocale (LC_ALL, "");
+	bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR);
+	textdomain (GETTEXT_PACKAGE);
+
     DBusGConnection * connection = dbus_g_bus_get(DBUS_BUS_SESSION, NULL);
     DBusGProxy * bus_proxy = dbus_g_proxy_new_for_name(connection, DBUS_SERVICE_DBUS, DBUS_PATH_DBUS, DBUS_INTERFACE_DBUS);
     GError * error = NULL;

=== modified file 'src/status-service.c'
--- src/status-service.c	2009-09-10 18:40:49 +0000
+++ src/status-service.c	2009-09-15 20:34:14 +0000
@@ -20,6 +20,7 @@
 with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
+#include <config.h>
 
 #include <sys/types.h>
 #include <pwd.h>
@@ -257,6 +258,12 @@
 {
     g_type_init();
 
+	/* Setting up i18n and gettext.  Apparently, we need
+	   all of these. */
+	setlocale (LC_ALL, "");
+	bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR);
+	textdomain (GETTEXT_PACKAGE);
+
     DBusGConnection * connection = dbus_g_bus_get(DBUS_BUS_SESSION, NULL);
     DBusGProxy * bus_proxy = dbus_g_proxy_new_for_name(connection, DBUS_SERVICE_DBUS, DBUS_PATH_DBUS, DBUS_INTERFACE_DBUS);
     GError * error = NULL;

=== modified file 'src/users-service.c'
--- src/users-service.c	2009-09-03 18:46:44 +0000
+++ src/users-service.c	2009-09-15 20:34:14 +0000
@@ -20,6 +20,8 @@
 with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
+#include <config.h>
+
 #include <unistd.h>
 
 #include <glib/gi18n.h>
@@ -133,6 +135,12 @@
 {
     g_type_init();
 
+	/* Setting up i18n and gettext.  Apparently, we need
+	   all of these. */
+	setlocale (LC_ALL, "");
+	bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR);
+	textdomain (GETTEXT_PACKAGE);
+
     session_bus = dbus_g_bus_get(DBUS_BUS_SESSION, NULL);
     bus_proxy = dbus_g_proxy_new_for_name(session_bus, DBUS_SERVICE_DBUS, DBUS_PATH_DBUS, DBUS_INTERFACE_DBUS);
     GError * error = NULL;


Follow ups