Re: [PATCH] Fix gtk_builder_set_translation_domain() calling



On Wed, 2011-08-17 at 14:10 +0300, Ozan Çağlayan wrote:
> 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(-)

Applied to both, since it applies cleanly and I suspect you meant it to
be...

Thanks!
Dan

> 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]