[network-manager-openconnect] 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] ui: fix gtk_builder_set_translation_domain() calling
- Date: Fri, 19 Aug 2011 20:53:42 +0000 (UTC)
commit b866a0ca0f2b1319a2521497aaad0d19aeed3b46
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 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");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]