diff options
author | Claudio Saavedra <csaavedra@igalia.com> | 2013-02-20 02:28:05 +0800 |
---|---|---|
committer | Claudio Saavedra <csaavedra@igalia.com> | 2013-03-05 16:58:10 +0800 |
commit | 0b67bd0b7c0d391441b60da38a1720f4d840d920 (patch) | |
tree | ee8e49717c92d4d3e549f07251bb977e8cc0a2f8 /src | |
parent | 4e23859050fd1410820312c16a21b3716d9f08e9 (diff) | |
download | gsoc2013-epiphany-0b67bd0b7c0d391441b60da38a1720f4d840d920.tar gsoc2013-epiphany-0b67bd0b7c0d391441b60da38a1720f4d840d920.tar.gz gsoc2013-epiphany-0b67bd0b7c0d391441b60da38a1720f4d840d920.tar.bz2 gsoc2013-epiphany-0b67bd0b7c0d391441b60da38a1720f4d840d920.tar.lz gsoc2013-epiphany-0b67bd0b7c0d391441b60da38a1720f4d840d920.tar.xz gsoc2013-epiphany-0b67bd0b7c0d391441b60da38a1720f4d840d920.tar.zst gsoc2013-epiphany-0b67bd0b7c0d391441b60da38a1720f4d840d920.zip |
incognito: show about:incognito instead of the overview
The overview shouldn't be shown in an incognito window as it reveals
information about the browsing activity of the user. Also, a welcome
page indicating the scope of the incognito window is better.
https://bugzilla.gnome.org/show_bug.cgi?id=694200
Diffstat (limited to 'src')
-rw-r--r-- | src/ephy-window.c | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/src/ephy-window.c b/src/ephy-window.c index a59c310d0..6b760f19f 100644 --- a/src/ephy-window.c +++ b/src/ephy-window.c @@ -2686,6 +2686,7 @@ ephy_window_connect_active_embed (EphyWindow *window) WebKitWebView *web_view; EphyWebView *view; EphyOverview *overview; + EphyEmbedShellMode shell_mode; g_return_if_fail (window->priv->active_embed != NULL); @@ -2787,10 +2788,13 @@ ephy_window_connect_active_embed (EphyWindow *window) 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), - window, 0); + shell_mode = ephy_embed_shell_get_mode (EPHY_EMBED_SHELL (ephy_embed_shell_get_default ())); + if (shell_mode != EPHY_EMBED_SHELL_MODE_INCOGNITO) { + overview = ephy_embed_get_overview (embed); + g_signal_connect_object (overview, "open-link", + G_CALLBACK (overview_open_link_cb), + window, 0); + } g_object_notify (G_OBJECT (window), "active-child"); } @@ -2803,6 +2807,7 @@ ephy_window_disconnect_active_embed (EphyWindow *window) EphyWebView *view; EphyOverview *overview; guint sid; + EphyEmbedShellMode shell_mode; g_return_if_fail (window->priv->active_embed != NULL); @@ -2876,10 +2881,13 @@ ephy_window_disconnect_active_embed (EphyWindow *window) 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), - window); + shell_mode = ephy_embed_shell_get_mode (EPHY_EMBED_SHELL (ephy_embed_shell_get_default ())); + if (shell_mode != EPHY_EMBED_SHELL_MODE_INCOGNITO) { + overview = ephy_embed_get_overview (embed); + g_signal_handlers_disconnect_by_func (overview, + G_CALLBACK (overview_open_link_cb), + window); + } g_signal_handlers_disconnect_by_func (view, G_CALLBACK (ephy_window_dom_mouse_click_cb), window); |