[epiphany/in-tab-overview] ephy-window: disable default actions when the active embed is showing an overview
- From: Claudio Saavedra <csaavedra src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany/in-tab-overview] ephy-window: disable default actions when the active embed is showing an overview
- Date: Tue, 28 Aug 2012 14:14:02 +0000 (UTC)
commit 68e9f51a51ea79defc0dd1fa57a3d2bea141e5a2
Author: Claudio Saavedra <csaavedra igalia com>
Date: Tue Aug 28 17:13:20 2012 +0300
ephy-window: disable default actions when the active embed is showing an overview
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 69f0140..9319613 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),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]