diff options
author | Christian Persch <chpe@cvs.gnome.org> | 2004-01-13 03:31:40 +0800 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2004-01-13 03:31:40 +0800 |
commit | 2013edd40e2f4e8c357a6bbcd6d45af9bb3a9e2b (patch) | |
tree | 4b7b1c02e46ecc1060c7b8627c168a1fdacb395b /src/ephy-window.c | |
parent | bec1819707d9735ef7156c0671026d13e4ec0d76 (diff) | |
download | gsoc2013-epiphany-2013edd40e2f4e8c357a6bbcd6d45af9bb3a9e2b.tar gsoc2013-epiphany-2013edd40e2f4e8c357a6bbcd6d45af9bb3a9e2b.tar.gz gsoc2013-epiphany-2013edd40e2f4e8c357a6bbcd6d45af9bb3a9e2b.tar.bz2 gsoc2013-epiphany-2013edd40e2f4e8c357a6bbcd6d45af9bb3a9e2b.tar.lz gsoc2013-epiphany-2013edd40e2f4e8c357a6bbcd6d45af9bb3a9e2b.tar.xz gsoc2013-epiphany-2013edd40e2f4e8c357a6bbcd6d45af9bb3a9e2b.tar.zst gsoc2013-epiphany-2013edd40e2f4e8c357a6bbcd6d45af9bb3a9e2b.zip |
Only allow "Open in New Tab/Window" for certain protocols.
2004-01-12 Christian Persch <chpe@cvs.gnome.org>
* embed/mozilla/ContentHandler.cpp:
* embed/mozilla/EventContext.cpp:
* embed/mozilla/EventContext.h:
* src/ephy-tab.c: (address_has_web_scheme):
* src/ephy-window.c: (show_embed_popup):
Only allow "Open in New Tab/Window" for certain protocols.
Diffstat (limited to 'src/ephy-window.c')
-rw-r--r-- | src/ephy-window.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/ephy-window.c b/src/ephy-window.c index 896a5dcf8..d78d6013c 100644 --- a/src/ephy-window.c +++ b/src/ephy-window.c @@ -1256,7 +1256,7 @@ show_embed_popup (EphyWindow *window, EphyTab *tab, EphyEmbedEvent *event) EmbedEventContext context; const char *popup; const GValue *value; - gboolean framed, has_background; + gboolean framed, has_background, can_open_in_new; GtkWidget *widget; EphyEmbedEventType type; gboolean showing_edit_actions = FALSE; @@ -1271,6 +1271,7 @@ show_embed_popup (EphyWindow *window, EphyTab *tab, EphyEmbedEvent *event) framed = g_value_get_int (value); has_background = ephy_embed_event_has_property (event, "background_image"); + can_open_in_new = ephy_embed_event_has_property (event, "link-has-web-scheme"); context = ephy_embed_event_get_context (event); @@ -1310,6 +1311,10 @@ show_embed_popup (EphyWindow *window, EphyTab *tab, EphyEmbedEvent *event) action = gtk_action_group_get_action (action_group, "SaveBackgroundAs"); g_object_set (action, "sensitive", has_background, "visible", has_background, NULL); + action = gtk_action_group_get_action (action_group, "OpenLinkInNewWindow"); + g_object_set (action, "sensitive", can_open_in_new, FALSE); + action = gtk_action_group_get_action (action_group, "OpenLinkInNewTab"); + g_object_set (action, "sensitive", can_open_in_new, FALSE); if (showing_edit_actions) { |