aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Gould <ted@canonical.com>2009-09-16 09:25:09 -0500
committerTed Gould <ted@canonical.com>2009-09-16 09:25:09 -0500
commit24543619fb480c635209d8f2382845cb2562a5f1 (patch)
treedbadc35f9978f37f4abb396464b01dfddb7dbb1d
parent82395ac94e6daaf020d0310602756007a6b89451 (diff)
parent29b907bc1c91648aef47f3082c839395c4c8aa3f (diff)
downloadayatana-indicator-session-24543619fb480c635209d8f2382845cb2562a5f1.tar.gz
ayatana-indicator-session-24543619fb480c635209d8f2382845cb2562a5f1.tar.bz2
ayatana-indicator-session-24543619fb480c635209d8f2382845cb2562a5f1.zip
Branch to init i18n in the various services
-rw-r--r--src/gtk-dialog/gtk-logout-helper.c8
-rw-r--r--src/session-service.c7
-rw-r--r--src/status-service.c7
-rw-r--r--src/users-service.c8
4 files changed, 29 insertions, 1 deletions
diff --git a/src/gtk-dialog/gtk-logout-helper.c b/src/gtk-dialog/gtk-logout-helper.c
index e6a9ef8..0c03e86 100644
--- a/src/gtk-dialog/gtk-logout-helper.c
+++ b/src/gtk-dialog/gtk-logout-helper.c
@@ -21,7 +21,7 @@ You should have received a copy of the GNU General Public License along
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 @@ main (int argc, char * argv[])
{
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");
diff --git a/src/session-service.c b/src/session-service.c
index 59a3a97..4db0a6e 100644
--- a/src/session-service.c
+++ b/src/session-service.c
@@ -21,6 +21,7 @@ You should have received a copy of the GNU General Public License along
with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#include <config.h>
#include <glib/gi18n.h>
@@ -282,6 +283,12 @@ main (int argc, char ** argv)
{
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;
diff --git a/src/status-service.c b/src/status-service.c
index d8f60d4..b4a2e09 100644
--- a/src/status-service.c
+++ b/src/status-service.c
@@ -20,6 +20,7 @@ You should have received a copy of the GNU General Public License along
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 @@ main (int argc, char ** argv)
{
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;
diff --git a/src/users-service.c b/src/users-service.c
index 5db832b..d50a277 100644
--- a/src/users-service.c
+++ b/src/users-service.c
@@ -20,6 +20,8 @@ You should have received a copy of the GNU General Public License along
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 @@ main (int argc, char ** argv)
{
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;