[Xfce4-commits] <midori:master> Use previously cached icon in error pages

Christian Dywan noreply at xfce.org
Fri Dec 16 01:44:02 CET 2011


Updating branch refs/heads/master
         to 1984c69d070dc0db0e2701dba3225e9b9922feed (commit)
       from 9e5fb1ef2755db6c35863d82b84511ffb9e4a99b (commit)

commit 1984c69d070dc0db0e2701dba3225e9b9922feed
Author: Christian Dywan <christian at twotoasts.de>
Date:   Fri Dec 16 00:40:53 2011 +0100

    Use previously cached icon in error pages
    
    This notably includes delayed pages.

 data/error.html      |    1 +
 midori/midori-view.c |    4 ++++
 2 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/data/error.html b/data/error.html
index 5d01bb9..8212708 100644
--- a/data/error.html
+++ b/data/error.html
@@ -6,6 +6,7 @@
 <html>
 <head>
 <title>{title}</title>
+<link rel="shortcut icon" href="{icon}" />
 <style type="text/css">
 body {
    background-color: #eee;
diff --git a/midori/midori-view.c b/midori/midori-view.c
index 0fa485d..9295037 100644
--- a/midori/midori-view.c
+++ b/midori/midori-view.c
@@ -1013,6 +1013,7 @@ webkit_web_view_load_committed_cb (WebKitWebView*  web_view,
     for (; children; children = g_list_next (children))
         if (g_object_get_data (G_OBJECT (children->data), "midori-infobar-cb"))
             gtk_widget_destroy (children->data);
+    g_list_free (children);
     view->alerts = 0;
 
     if (g_strcmp0 (uri, katze_item_get_uri (view->item)))
@@ -1383,11 +1384,14 @@ midori_view_display_error (MidoriView*     view,
     if (g_file_get_contents (path, &template, NULL, NULL))
     {
         gchar* title_escaped;
+        const gchar* icon;
         gchar* result;
 
         title_escaped = g_markup_escape_text (title, -1);
+        icon = katze_item_get_icon (view->item);
         result = sokoke_replace_variables (template,
             "{title}", title_escaped,
+            "{icon}", icon ? icon : "",
             "{message}", message,
             "{description}", description,
             "{tryagain}", try_again,


More information about the Xfce4-commits mailing list