[epiphany] ephy-encoding-dialog: make this work again



commit a48ed2ac052a60885a005bda9323002c87340972
Author: Xan Lopez <xan igalia com>
Date:   Mon Mar 25 15:52:46 2013 +0100

    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 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/ephy-encoding-dialog.c b/src/ephy-encoding-dialog.c
index de15cba..0e56cd2 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;
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]