[PATCH] Fix gtk_builder_set_translation_domain() calling
- From: Ozan Çağlayan <ozan pardus org tr>
- To: networkmanager-list gnome org
- Subject: [PATCH] Fix gtk_builder_set_translation_domain() calling
- Date: Wed, 17 Aug 2011 14:10:12 +0300
gtk_builder_set_translation_domain() should be called before
gtk_builder_add_from_file(). This fixes UI messages always in English
problem.
---
properties/nm-openconnect.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/properties/nm-openconnect.c b/properties/nm-openconnect.c
index 2c3499f..81aaad9 100644
--- a/properties/nm-openconnect.c
+++ b/properties/nm-openconnect.c
@@ -508,6 +508,8 @@ nm_vpn_plugin_ui_widget_interface_new (NMConnection *connection, GError **error)
ui_file = g_strdup_printf ("%s/%s", UIDIR, "nm-openconnect-dialog.ui");
priv->builder = gtk_builder_new ();
+ gtk_builder_set_translation_domain (priv->builder, GETTEXT_PACKAGE);
+
if (!gtk_builder_add_from_file (priv->builder, ui_file, error)) {
g_warning ("Couldn't load builder file: %s",
error && *error ? (*error)->message : "(unknown)");
@@ -520,8 +522,6 @@ nm_vpn_plugin_ui_widget_interface_new (NMConnection *connection, GError **error)
}
g_free (ui_file);
- gtk_builder_set_translation_domain (priv->builder, GETTEXT_PACKAGE);
-
priv->widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, "openconnect-vbox"));
if (!priv->widget) {
g_set_error (error, OPENCONNECT_PLUGIN_UI_ERROR, 0, "could not load UI widget");
--
1.7.6
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]