]> spindle.queued.net Git - midori/commitdiff
Split about.css from error.html for about:private
authorChristian Dywan <christian@twotoasts.de>
Fri, 27 Jan 2012 22:06:37 +0000 (23:06 +0100)
committerChristian Dywan <christian@twotoasts.de>
Fri, 27 Jan 2012 22:06:37 +0000 (23:06 +0100)
data/error.html
midori/midori-view.c
wscript

index 821270855ec2060962334688502d8a5ed72f986b..6bc9698eb8d3d2dbb15bfd481d01df35beb8cda7 100644 (file)
@@ -2,67 +2,11 @@
  Error page template for Midori.
  This file is licensed under the terms of the expat license, see the file EXPAT.
 -->
-
 <html>
 <head>
 <title>{title}</title>
 <link rel="shortcut icon" href="{icon}" />
-<style type="text/css">
-body {
-   background-color: #eee;
-   margin: 0;
-   padding: 0;
-}
-
-#container {
-   background: #f6fff3;
-   min-width: 70%;
-   max-width: 70%;
-   margin: 2em auto 1em;
-   padding: 1em;
-   border: 0.2em solid #9acb7f;
-   -webkit-border-radius: 1em;
-}
-
-icon {
-   float: left;
-   padding-left: 1%;
-   padding-top: 1%;
-}
-
-#main {
-   float: right;
-   width: 90%;
-}
-
-h1 {
-   font-size: 1.4em;
-   font-weight: bold;
-   white-space: nowrap;
-   overflow: hidden;
-   text-overflow: ellipsis;
-}
-
-#logo {
-  position: absolute; right: 15px; bottom: 15px;
-  z-index: -1;
-}
-
-button span,
-button img {
-    vertical-align: middle;
-    padding: 2px 1px;
-}
-
-message {
-   font-size: 1.1em;
-}
-
-description {
-   font-size: 1em;
-}
-
-</style>
+<link rel="stylesheet" type="text/css" href="res://about.css" />
 </head>
 <body>
     <div id="container">
index a1907c82d6bf45695c76c5f5423120c9c8932f1a..5233adcf5ae8ea22b3ecdeb9ad43d7fd8c6e8d4c 100644 (file)
@@ -1089,7 +1089,7 @@ midori_view_web_view_resource_request_cb (WebKitWebView*         web_view,
     const gchar* uri = webkit_network_request_get_uri (request);
 
     /* Only apply custom URIs to special pages for security purposes */
-    if (!view->special)
+    if (!view->special && !midori_view_is_blank (view))
         return;
 
     if (g_str_has_prefix (uri, "res://"))
@@ -3979,10 +3979,15 @@ midori_view_set_uri (MidoriView*  view,
             {
                 katze_assign (view->uri, g_strdup (uri));
                 data = g_strdup_printf (
-                    "<html><head><title>%s</title></head>"
-                    "<body><h1>%s</h1>"
+                    "<html><head><title>%s</title>"
+                    "<link rel=\"stylesheet\" type=\"text/css\" href=\"res://about.css\">"
+                    "</head><body><div id=\"container\">"
+                    "<img id=\"logo\" src=\"res://logo-shade.png\">"
+                    "<img id=\"icon\" src=\"stock://gtk-dialog-info\">"
+                    "<div id=\"main\"><h1>%s</h1>"
                     "<p>%s</p><ul><li>%s</li><li>%s</li><li>%s</li></ul>"
-                    "<p>%s</p><ul><li>%s</li><li>%s</li><li>%s</li><li>%s</li></ul>",
+                    "<p>%s</p><ul><li>%s</li><li>%s</li><li>%s</li><li>%s</li></ul>"
+                    "</div><br style=\"clear: both\"></div></body></html>",
                     _("Private Browsing"), _("Private Browsing"),
                     _("Midori doesn't store any personal data:"),
                     _("No History or web cookies are being saved."),
diff --git a/wscript b/wscript
index 0d002021dd07a80052126c99f0bc88ebb4d587cc..6d874c3afa0c6337ce5753ec8fa4cce631d4d6ce 100644 (file)
--- a/wscript
+++ b/wscript
@@ -500,7 +500,7 @@ def build (bld):
         else:
             Utils.pprint ('BLUE', "logo-shade could not be rasterized.")
 
-    for res_file in ['error.html', 'close.png']:
+    for res_file in ['about.css', 'error.html', 'close.png']:
         bld.install_files ('${MDATADIR}/' + APPNAME + '/res', 'data/' + res_file)
     bld.install_as ( \
         '${MDATADIR}/' + APPNAME + '/res/speeddial-head-%s.html' % VERSION, \