[epiphany] Set URI as title in source code viewer



commit f074430f3e6514e8d181ddbbf36bb65c224c3420
Author: Jan-Michael Brummer <jan brummer tabos org>
Date:   Sun Jan 12 18:12:25 2020 +0100

    Set URI as title in source code viewer
    
    Fixes: https://gitlab.gnome.org/GNOME/epiphany/issues/1048

 embed/ephy-view-source-handler.c | 2 ++
 1 file changed, 2 insertions(+)
---
diff --git a/embed/ephy-view-source-handler.c b/embed/ephy-view-source-handler.c
index d70cfb688..f0ff4d23a 100644
--- a/embed/ephy-view-source-handler.c
+++ b/embed/ephy-view-source-handler.c
@@ -125,12 +125,14 @@ web_resource_data_cb (WebKitWebResource     *resource,
 
   html = g_strdup_printf ("<head>"
                           "  <link rel='stylesheet' 
href='ephy-resource:///org/gnome/epiphany/highlight.css'>"
+                          "  <title>%s</title>"
                           "</head>"
                           "<body class='hljs'>"
                           "  <script src='ephy-resource:///org/gnome/epiphany/highlight.js'></script>"
                           "  <script>hljs.initHighlightingOnLoad();</script>"
                           "  <pre><code class='html'>%s</code></pre>"
                           "</body>",
+                          webkit_web_resource_get_uri (resource),
                           escaped_str);
 
   finish_uri_scheme_request (request, g_steal_pointer (&html), NULL);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]