From a48ed2ac052a60885a005bda9323002c87340972 Mon Sep 17 00:00:00 2001 From: Xan Lopez Date: Mon, 25 Mar 2013 15:52:46 +0100 Subject: ephy-encoding-dialog: make this work again We were not resetting correctly the internal state when getting a NULL encoding from WebKit, so the dialog would stop working after that. https://bugzilla.gnome.org/show_bug.cgi?id=696548 --- src/ephy-encoding-dialog.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/ephy-encoding-dialog.c') diff --git a/src/ephy-encoding-dialog.c b/src/ephy-encoding-dialog.c index de15cbae3..0e56cd2e7 100644 --- a/src/ephy-encoding-dialog.c +++ b/src/ephy-encoding-dialog.c @@ -119,13 +119,13 @@ sync_encoding_against_embed (EphyEncodingDialog *dialog) view = EPHY_GET_WEBKIT_WEB_VIEW_FROM_EMBED (embed); #ifdef HAVE_WEBKIT2 encoding = webkit_web_view_get_custom_charset (view); - if (encoding == NULL) return; + if (encoding == NULL) goto out; #else encoding = webkit_web_view_get_custom_encoding (view); if (encoding == NULL) { encoding = webkit_web_view_get_encoding (view); - if (encoding == NULL) return; + if (encoding == NULL) goto out; is_automatic = TRUE; } #endif @@ -156,7 +156,7 @@ sync_encoding_against_embed (EphyEncodingDialog *dialog) button = ephy_dialog_get_control (EPHY_DIALOG (dialog), "automatic_button"); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), is_automatic); - +out: dialog->priv->update_tag = FALSE; } -- cgit v1.2.1