Use previously cached icon in error pages

This notably includes delayed pages.
This commit is contained in:
Christian Dywan 2011-12-16 00:40:53 +01:00
parent 9e5fb1ef27
commit 1984c69d07
2 changed files with 5 additions and 0 deletions

View file

@ -6,6 +6,7 @@
<html> <html>
<head> <head>
<title>{title}</title> <title>{title}</title>
<link rel="shortcut icon" href="{icon}" />
<style type="text/css"> <style type="text/css">
body { body {
background-color: #eee; background-color: #eee;

View file

@ -1013,6 +1013,7 @@ webkit_web_view_load_committed_cb (WebKitWebView* web_view,
for (; children; children = g_list_next (children)) for (; children; children = g_list_next (children))
if (g_object_get_data (G_OBJECT (children->data), "midori-infobar-cb")) if (g_object_get_data (G_OBJECT (children->data), "midori-infobar-cb"))
gtk_widget_destroy (children->data); gtk_widget_destroy (children->data);
g_list_free (children);
view->alerts = 0; view->alerts = 0;
if (g_strcmp0 (uri, katze_item_get_uri (view->item))) 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)) if (g_file_get_contents (path, &template, NULL, NULL))
{ {
gchar* title_escaped; gchar* title_escaped;
const gchar* icon;
gchar* result; gchar* result;
title_escaped = g_markup_escape_text (title, -1); title_escaped = g_markup_escape_text (title, -1);
icon = katze_item_get_icon (view->item);
result = sokoke_replace_variables (template, result = sokoke_replace_variables (template,
"{title}", title_escaped, "{title}", title_escaped,
"{icon}", icon ? icon : "",
"{message}", message, "{message}", message,
"{description}", description, "{description}", description,
"{tryagain}", try_again, "{tryagain}", try_again,