diff options
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | src/ephy-encoding-menu.c | 16 |
2 files changed, 15 insertions, 8 deletions
@@ -1,5 +1,12 @@ 2004-01-06 Christian Persch <chpe@cvs.gnome.org> + * src/ephy-encoding-menu.c: (update_encoding_menu_cb): + + Move "automatic" check back to where it was, since we now always have + a node for the encoding. + +2004-01-06 Christian Persch <chpe@cvs.gnome.org> + * Makefile.am: * configure.in: diff --git a/src/ephy-encoding-menu.c b/src/ephy-encoding-menu.c index 11c4d44aa..bd76aa4d2 100644 --- a/src/ephy-encoding-menu.c +++ b/src/ephy-encoding-menu.c @@ -186,6 +186,14 @@ update_encoding_menu_cb (GtkAction *dummy, EphyEncodingMenu *menu) enc_node = ephy_encodings_get_node (p->encodings, encoding, TRUE); g_assert (EPHY_IS_NODE (enc_node)); + /* 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); + /* set the encodings group's active member */ g_snprintf (name, sizeof (name), "Encoding%s", encoding); action = gtk_action_group_get_action (p->action_group, name); @@ -216,14 +224,6 @@ 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) { |