[network-manager-openconnect/NM_0_8] ui: fix gtk_builder_set_translation_domain() calling
- From: Dan Williams <dcbw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [network-manager-openconnect/NM_0_8] ui: fix gtk_builder_set_translation_domain() calling
- Date: Fri, 19 Aug 2011 20:53:37 +0000 (UTC)
commit 3eef1fcc1db171241586fb0a4b51c7abbf0a341c
Author: Ozan ÃaÄlayan <ozan pardus org tr>
Date: Wed Aug 17 14:10:12 2011 +0300
ui: fix gtk_builder_set_translation_domain() calling
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 8b6a696..90579ad 100644
--- a/properties/nm-openconnect.c
+++ b/properties/nm-openconnect.c
@@ -494,6 +494,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)");
@@ -506,8 +508,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");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]