[Xfce4-commits] <midori:master> Split about.css from error.html for about:private

Christian Dywan noreply at xfce.org
Fri Jan 27 23:10:04 CET 2012


Updating branch refs/heads/master
         to ce527689c6ec7869d201d51d7b50f9c7738e150b (commit)
       from f1e168b56944735d0dd49580eb9242086c0ef533 (commit)

commit ce527689c6ec7869d201d51d7b50f9c7738e150b
Author: Christian Dywan <christian at twotoasts.de>
Date:   Fri Jan 27 23:06:37 2012 +0100

    Split about.css from error.html for about:private

 data/error.html      |   58 +-------------------------------------------------
 midori/midori-view.c |   13 +++++++---
 wscript              |    2 +-
 3 files changed, 11 insertions(+), 62 deletions(-)

diff --git a/data/error.html b/data/error.html
index 8212708..6bc9698 100644
--- a/data/error.html
+++ b/data/error.html
@@ -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">
diff --git a/midori/midori-view.c b/midori/midori-view.c
index a1907c8..5233adc 100644
--- a/midori/midori-view.c
+++ b/midori/midori-view.c
@@ -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 0d00202..6d874c3 100644
--- 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, \


More information about the Xfce4-commits mailing list