[epiphany] ephy-window: about:blank and incognito pages should also be considered as blank
- From: Carlos Garcia Campos <carlosgc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] ephy-window: about:blank and incognito pages should also be considered as blank
- Date: Mon, 5 Dec 2016 14:16:29 +0000 (UTC)
commit cbd74e1689fd65d503a4f466d9bc8cdabb2403b2
Author: Carlos Garcia Campos <cgarcia igalia com>
Date: Sat Dec 3 13:17:24 2016 +0100
ephy-window: about:blank and incognito pages should also be considered as blank
We are disabling several actions on blank pages, but we are only setting
the SENS_FLAG_IS_BLANK to TRUE for the overview. Use
ephy_web_view_get_is_blank() instead and update
ephy_web_view_set_address() to use ephy_embed_utils_url_is_empty() to
decide whether the web view is blank or not.
embed/ephy-web-view.c | 5 +----
src/ephy-window.c | 2 +-
2 files changed, 2 insertions(+), 5 deletions(-)
---
diff --git a/embed/ephy-web-view.c b/embed/ephy-web-view.c
index 5d73a4c..574b105 100644
--- a/embed/ephy-web-view.c
+++ b/embed/ephy-web-view.c
@@ -925,7 +925,6 @@ ephy_web_view_set_address (EphyWebView *view,
const char *address)
{
GObject *object = G_OBJECT (view);
- gboolean is_blank;
gboolean was_empty;
if (g_strcmp0 (view->address, address) == 0)
@@ -938,9 +937,7 @@ ephy_web_view_set_address (EphyWebView *view,
g_free (view->display_address);
view->display_address = ephy_uri_decode (view->address);
- is_blank = address == NULL ||
- strcmp (address, "about:blank") == 0;
- _ephy_web_view_set_is_blank (view, is_blank);
+ _ephy_web_view_set_is_blank (view, ephy_embed_utils_url_is_empty (address));
/* If the view was empty there is no need to clean the typed address. */
if (!was_empty && ephy_web_view_is_loading (view) && view->typed_address != NULL)
diff --git a/src/ephy-window.c b/src/ephy-window.c
index 6f0989c..938ba82 100644
--- a/src/ephy-window.c
+++ b/src/ephy-window.c
@@ -992,7 +992,7 @@ sync_tab_address (EphyWebView *view,
_ephy_window_set_default_actions_sensitive (window,
SENS_FLAG_IS_BLANK,
- ephy_web_view_is_overview (view));
+ ephy_web_view_get_is_blank (view));
location = calculate_location (typed_address, address);
ephy_window_set_location (window, location);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]