diff options
author | Claudio Saavedra <csaavedra@igalia.com> | 2012-08-28 22:13:20 +0800 |
---|---|---|
committer | Claudio Saavedra <csaavedra@igalia.com> | 2012-09-01 02:34:01 +0800 |
commit | cd363f052824a52e5ff32cd969076c42c54ab7bb (patch) | |
tree | 150e426977239a568414af97e43ae37333635553 | |
parent | 68c462736befcc1a84929a48b1ccfb09de8655ba (diff) | |
download | gsoc2013-epiphany-cd363f052824a52e5ff32cd969076c42c54ab7bb.tar.gz gsoc2013-epiphany-cd363f052824a52e5ff32cd969076c42c54ab7bb.tar.zst gsoc2013-epiphany-cd363f052824a52e5ff32cd969076c42c54ab7bb.zip |
ephy-window: disable default actions when the active embed is showing an overview
-rw-r--r-- | src/ephy-window.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/ephy-window.c b/src/ephy-window.c index 69f014031..93196136f 100644 --- a/src/ephy-window.c +++ b/src/ephy-window.c @@ -2120,6 +2120,16 @@ ephy_window_visibility_cb (EphyEmbed *embed, GParamSpec *pspec, EphyWindow *wind } static void +sync_embed_is_overview (EphyEmbed *embed, GParamSpec *pspec, EphyWindow *window) +{ + if (window->priv->closing) return; + + _ephy_window_set_default_actions_sensitive (window, + SENS_FLAG_IS_BLANK, + ephy_embed_get_overview_mode (embed));; +} + +static void overview_open_link_cb (EphyOverview *overview, const char *url, EphyWindow *window) @@ -2586,6 +2596,7 @@ ephy_window_connect_active_embed (EphyWindow *window) sync_tab_icon (view, NULL, window); sync_tab_popup_windows (view, NULL, window); sync_tab_popups_allowed (view, NULL, window); + sync_embed_is_overview (embed, NULL, window); sync_tab_zoom (web_view, NULL, window); @@ -2665,6 +2676,10 @@ ephy_window_connect_active_embed (EphyWindow *window) G_CALLBACK (ephy_window_visibility_cb), window, 0); + g_signal_connect_object (embed, "notify::overview-mode", + G_CALLBACK (sync_embed_is_overview), + window, 0); + overview = ephy_embed_get_overview (embed); g_signal_connect_object (overview, "open-link", G_CALLBACK (overview_open_link_cb), @@ -2756,6 +2771,10 @@ ephy_window_disconnect_active_embed (EphyWindow *window) G_CALLBACK (ephy_window_visibility_cb), window); + g_signal_handlers_disconnect_by_func (view, + G_CALLBACK (sync_embed_is_overview), + window); + overview = ephy_embed_get_overview (embed); g_signal_handlers_disconnect_by_func (overview, G_CALLBACK (overview_open_link_cb), |