diff options
author | Christian Persch <chpe@cvs.gnome.org> | 2004-01-06 20:56:02 +0800 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2004-01-06 20:56:02 +0800 |
commit | 1158a826cc4f3b9d71745bff312f25e0122ec445 (patch) | |
tree | 2f1f1242662be6471636dab5d03c1f47c56f8465 /src/ephy-encoding-menu.c | |
parent | d443984286d3bb912148eb889b5f0efa6ac8ae19 (diff) | |
download | gsoc2013-epiphany-1158a826cc4f3b9d71745bff312f25e0122ec445.tar gsoc2013-epiphany-1158a826cc4f3b9d71745bff312f25e0122ec445.tar.gz gsoc2013-epiphany-1158a826cc4f3b9d71745bff312f25e0122ec445.tar.bz2 gsoc2013-epiphany-1158a826cc4f3b9d71745bff312f25e0122ec445.tar.lz gsoc2013-epiphany-1158a826cc4f3b9d71745bff312f25e0122ec445.tar.xz gsoc2013-epiphany-1158a826cc4f3b9d71745bff312f25e0122ec445.tar.zst gsoc2013-epiphany-1158a826cc4f3b9d71745bff312f25e0122ec445.zip |
Always set the "automatic" toggle button correctly, even if the encoding
2004-01-06 Christian Persch <chpe@cvs.gnome.org>
* src/ephy-encoding-menu.c: (update_encoding_menu_cb):
Always set the "automatic" toggle button correctly, even if the encoding
wasn't found in our database
Diffstat (limited to 'src/ephy-encoding-menu.c')
-rw-r--r-- | src/ephy-encoding-menu.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/ephy-encoding-menu.c b/src/ephy-encoding-menu.c index 14aa4e63c..ee42f692d 100644 --- a/src/ephy-encoding-menu.c +++ b/src/ephy-encoding-menu.c @@ -194,14 +194,6 @@ update_encoding_menu_cb (GtkAction *dummy, EphyEncodingMenu *menu) action = gtk_action_group_get_action (p->action_group, name); gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action), TRUE); - /* check if encoding was overridden */ - is_automatic = ephy_encoding_info_is_automatic (info); - - action = gtk_action_group_get_action (p->action_group, - "ViewEncodingAutomatic"); - gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action), is_automatic); - g_object_set (G_OBJECT (action), "sensitive", !is_automatic, NULL); - /* get encodings related to the current encoding */ groups = ephy_node_get_property_int (enc_node, EPHY_NODE_ENCODING_PROP_LANGUAGE_GROUPS); @@ -227,6 +219,15 @@ update_encoding_menu_cb (GtkAction *dummy, EphyEncodingMenu *menu) recent = g_list_sort (recent, (GCompareFunc) sort_encodings); build_menu: + /* check if encoding was overridden */ + is_automatic = ephy_encoding_info_is_automatic (info); + + action = gtk_action_group_get_action (p->action_group, + "ViewEncodingAutomatic"); + gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action), is_automatic); + g_object_set (G_OBJECT (action), "sensitive", !is_automatic, NULL); + + /* clear the menu */ if (p->merge_id > 0) { |