[epiphany/mcatanzaro/pdf: 12/12] view: avoid adding ephy-pdf URIs to history database
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany/mcatanzaro/pdf: 12/12] view: avoid adding ephy-pdf URIs to history database
- Date: Thu, 11 Mar 2021 19:34:24 +0000 (UTC)
commit 279570b97d32b8e80f7f6d6a98b603180630e5ee
Author: Michael Catanzaro <mcatanzaro gnome org>
Date: Sat Mar 6 14:31:30 2021 -0600
view: avoid adding ephy-pdf URIs to history database
ephy-pdf: is an internal URI scheme and it shouldn't be showing up in
the address bar dropdown or the history dialog.
embed/ephy-web-view.c | 6 ++++++
1 file changed, 6 insertions(+)
---
diff --git a/embed/ephy-web-view.c b/embed/ephy-web-view.c
index 4bf68f174..1dd9ffc18 100644
--- a/embed/ephy-web-view.c
+++ b/embed/ephy-web-view.c
@@ -739,6 +739,10 @@ title_changed_cb (WebKitWebView *web_view,
if (!title && uri)
title = title_from_address = ephy_embed_utils_get_title_from_address (uri);
+ /* FIXME: we don't follow the same rules for transforming uri here that we do
+ * when adding it to the history db in load_committed. Should probably try to
+ * use EphyWebView:address instead?
+ */
if (uri && title && *title && !ephy_web_view_is_history_frozen (webview))
ephy_history_service_set_url_title (history, uri, title, NULL, NULL, NULL);
@@ -1560,6 +1564,8 @@ load_changed_cb (WebKitWebView *web_view,
/* TODO: move the normalization down to the history service? */
if (g_str_has_prefix (uri, EPHY_ABOUT_SCHEME))
history_uri = g_strdup_printf ("about:%s", uri + EPHY_ABOUT_SCHEME_LEN + 1);
+ else if (g_str_has_prefix (uri, EPHY_PDF_SCHEME))
+ history_uri = g_strdup (uri + strlen (EPHY_PDF_SCHEME) + 1);
else
history_uri = g_strdup (uri);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]