From 5b39b99462ae5b868bc8aae688255197e850d036 Mon Sep 17 00:00:00 2001 From: Christian Persch Date: Sun, 29 May 2005 14:46:18 +0000 Subject: Allow ViewSource for XML documents too. Fixes bug #305788. 2005-05-29 Christian Persch * src/ephy-window.c: (sync_tab_document_type): Allow ViewSource for XML documents too. Fixes bug #305788. --- src/ephy-window.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/ephy-window.c') diff --git a/src/ephy-window.c b/src/ephy-window.c index 645b5b9bf..871f35eca 100644 --- a/src/ephy-window.c +++ b/src/ephy-window.c @@ -1132,7 +1132,7 @@ sync_tab_document_type (EphyTab *tab, GtkActionGroup *action_group = priv->action_group; GtkAction *action; EphyEmbedDocumentType type; - gboolean can_find, disable; + gboolean can_find, disable, is_image; if (priv->closing) return; @@ -1141,12 +1141,13 @@ sync_tab_document_type (EphyTab *tab, type = ephy_tab_get_document_type (tab); can_find = (type != EPHY_EMBED_DOCUMENT_IMAGE); + is_image = type == EPHY_EMBED_DOCUMENT_IMAGE; disable = (type != EPHY_EMBED_DOCUMENT_HTML); action = gtk_action_group_get_action (action_group, "ViewEncoding"); ephy_action_change_sensitivity_flags (action, SENS_FLAG_DOCUMENT, disable); action = gtk_action_group_get_action (action_group, "ViewPageSource"); - ephy_action_change_sensitivity_flags (action, SENS_FLAG_DOCUMENT, disable); + ephy_action_change_sensitivity_flags (action, SENS_FLAG_DOCUMENT, is_image); action = gtk_action_group_get_action (action_group, "EditFind"); ephy_action_change_sensitivity_flags (action, SENS_FLAG_DOCUMENT, !can_find); action = gtk_action_group_get_action (action_group, "EditFindNext"); -- cgit