[network-manager-openvpn] ui: fix gtk_builder_set_translation_domain() calling
- From: Dan Williams <dcbw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [network-manager-openvpn] ui: fix gtk_builder_set_translation_domain() calling
- Date: Fri, 19 Aug 2011 20:51:43 +0000 (UTC)
commit dad966d9fc812018cee3d309cbcf4087fdac4415
Author: Ozan ÃaÄlayan <ozan pardus org tr>
Date: Wed Aug 17 14:14:23 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/auth-helpers.c | 4 ++--
properties/nm-openvpn.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/properties/auth-helpers.c b/properties/auth-helpers.c
index 9112e34..8d4764e 100644
--- a/properties/auth-helpers.c
+++ b/properties/auth-helpers.c
@@ -1308,6 +1308,8 @@ advanced_dialog_new (GHashTable *hash, const char *contype)
ui_file = g_strdup_printf ("%s/%s", UIDIR, "nm-openvpn-dialog.ui");
builder = gtk_builder_new ();
+ gtk_builder_set_translation_domain (builder, GETTEXT_PACKAGE);
+
if (!gtk_builder_add_from_file (builder, ui_file, &error)) {
g_warning ("Couldn't load builder file: %s", error->message);
g_error_free (error);
@@ -1315,8 +1317,6 @@ advanced_dialog_new (GHashTable *hash, const char *contype)
goto out;
}
- gtk_builder_set_translation_domain (builder, GETTEXT_PACKAGE);
-
dialog = GTK_WIDGET (gtk_builder_get_object (builder, "openvpn-advanced-dialog"));
if (!dialog) {
g_object_unref (G_OBJECT (builder));
diff --git a/properties/nm-openvpn.c b/properties/nm-openvpn.c
index 13f0431..3e09869 100644
--- a/properties/nm-openvpn.c
+++ b/properties/nm-openvpn.c
@@ -507,6 +507,8 @@ nm_vpn_plugin_ui_widget_interface_new (NMConnection *connection, GError **error)
ui_file = g_strdup_printf ("%s/%s", UIDIR, "nm-openvpn-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)");
@@ -518,8 +520,6 @@ nm_vpn_plugin_ui_widget_interface_new (NMConnection *connection, GError **error)
return NULL;
}
- gtk_builder_set_translation_domain (priv->builder, GETTEXT_PACKAGE);
-
g_free (ui_file);
priv->widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, "openvpn-vbox"));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]