]> spindle.queued.net Git - midori/commitdiff
Use previously cached icon in error pages
authorChristian Dywan <christian@twotoasts.de>
Thu, 15 Dec 2011 23:40:53 +0000 (00:40 +0100)
committerChristian Dywan <christian@twotoasts.de>
Thu, 15 Dec 2011 23:55:07 +0000 (00:55 +0100)
This notably includes delayed pages.

data/error.html
midori/midori-view.c

index 5d01bb92165c3584a0ee08bdec6e2aa6a573400a..821270855ec2060962334688502d8a5ed72f986b 100644 (file)
@@ -6,6 +6,7 @@
 <html>
 <head>
 <title>{title}</title>
+<link rel="shortcut icon" href="{icon}" />
 <style type="text/css">
 body {
    background-color: #eee;
index 0fa485dfda95657bacdc4f9bfb047d7a0da564e7..929503766e4b261771dc0787009b3fb574b37082 100644 (file)
@@ -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,