[epiphany] ephy-window: Do not offer webapp creation for internal pages
- From: Jan-Michael Brummer <jbrummer src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] ephy-window: Do not offer webapp creation for internal pages
- Date: Fri, 25 Sep 2020 21:03:03 +0000 (UTC)
commit 0ec55981841f301555f9cfbf29831e7f8750cc38
Author: Jan-Michael Brummer <jan brummer tabos org>
Date: Fri Sep 25 19:36:02 2020 +0200
ephy-window: Do not offer webapp creation for internal pages
Fixes: https://gitlab.gnome.org/GNOME/epiphany/-/issues/1347
src/ephy-window.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
---
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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]