diff options
author | Jan-Michael Brummer <jan.brummer@tabos.org> | 2020-09-25 19:36:02 +0200 |
---|---|---|
committer | Jan-Michael Brummer <jan.brummer@tabos.org> | 2020-09-25 20:53:04 +0000 |
commit | 0ec55981841f301555f9cfbf29831e7f8750cc38 (patch) | |
tree | c7890e5b8d2c52c1dc22bc5f99de3f928d2a86d9 | |
parent | fb5a055735bd3ac4d4da0617b15b27edddbebc22 (diff) | |
download | epiphany-0ec55981841f301555f9cfbf29831e7f8750cc38.tar.gz |
ephy-window: Do not offer webapp creation for internal pages
Fixes: https://gitlab.gnome.org/GNOME/epiphany/-/issues/1347
-rw-r--r-- | src/ephy-window.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/ephy-window.c b/src/ephy-window.c index c494e6a5b..7f4cefa8a 100644 --- a/src/ephy-window.c +++ b/src/ephy-window.c @@ -205,7 +205,8 @@ enum { SENS_FLAG_DOCUMENT = 1 << 2, SENS_FLAG_LOADING = 1 << 3, SENS_FLAG_NAVIGATION = 1 << 4, - SENS_FLAG_IS_BLANK = 1 << 5 + SENS_FLAG_IS_BLANK = 1 << 5, + SENS_FLAG_IS_INTERNAL_PAGE = 1 << 6, }; static gint @@ -1072,17 +1073,22 @@ sync_tab_address (EphyWebView *view, const char *address; const char *typed_address; char *location; + gboolean is_internal_page; if (window->closing) return; address = ephy_web_view_get_display_address (view); typed_address = ephy_web_view_get_typed_address (view); + is_internal_page = g_str_has_prefix (address, "about:") || g_str_has_prefix (address, "ephy-about:"); _ephy_window_set_default_actions_sensitive (window, SENS_FLAG_IS_BLANK, ephy_web_view_get_is_blank (view)); + _ephy_window_set_default_actions_sensitive (window, + SENS_FLAG_IS_INTERNAL_PAGE, is_internal_page); + location = calculate_location (typed_address, address); ephy_window_set_location (window, location); |