]> spindle.queued.net Git - midori/commitdiff
Implement informative text for private browsing
authorChristian Dywan <christian@twotoasts.de>
Fri, 27 Jan 2012 20:36:59 +0000 (21:36 +0100)
committerChristian Dywan <christian@twotoasts.de>
Fri, 27 Jan 2012 20:42:04 +0000 (21:42 +0100)
Internally about:private is shown when private browsing
is invoked without any URLs.

Fixes: https://bugs.launchpad.net/midori/+bug/768572
midori/main.c
midori/midori-browser.c
midori/midori-view.c

index 24c01e5992583cfd7461e665824272013f88b88b..4a92b0e3c6bda1d572b6c808853c8c3b9e551a99 100644 (file)
@@ -2268,6 +2268,10 @@ main (int    argc,
             }
         }
 
+        /* Informative text for private browsing unless we have a URI */
+        if (private && webapp == NULL && uris == NULL)
+            midori_browser_add_uri (browser, "about:private");
+
         if (midori_browser_get_current_uri (browser) == NULL)
             midori_browser_add_uri (browser, "about:blank");
 
index ccecdad5b60ecd3d9d299c5710dddba79798e030..e9a6223377b5f0f0b1c89da4a7a6adf08cd41949 100644 (file)
@@ -2306,7 +2306,7 @@ _action_private_browsing_activate (GtkAction*     action,
                                    MidoriBrowser* browser)
 {
     const gchar* uri = midori_browser_get_current_uri (browser);
-    sokoke_spawn_app (uri && *uri ? uri : "about:blank", TRUE);
+    sokoke_spawn_app ("", TRUE);
 }
 
 static void
index 0fc02c596b2ce09434e9bb3a59f2f6f78cd307f9..a1907c82d6bf45695c76c5f5423120c9c8932f1a 100644 (file)
@@ -3975,6 +3975,25 @@ midori_view_set_uri (MidoriView*  view,
                 katze_assign (view->uri, g_strdup (uri));
                 data = g_string_free (demo, FALSE);
             }
+            else if (!strcmp (uri, "about:private"))
+            {
+                katze_assign (view->uri, g_strdup (uri));
+                data = g_strdup_printf (
+                    "<html><head><title>%s</title></head>"
+                    "<body><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>",
+                    _("Private Browsing"), _("Private Browsing"),
+                    _("Midori doesn't store any personal data:"),
+                    _("No History or web cookies are being saved."),
+                    _("HTML5 storage, local database and application caches are disabled."),
+                    _("Extensions are disabled."),
+                    _("Midori prevents websites from tracking the user:"),
+                    _("Referrer URLs are stripped down to the hostname."),
+                    _("DNS prefetching is disabled."),
+                    _("The language and timezone are not revealed to websites."),
+                    _("Flash and other Netscape plugins cannot be listed by websites."));
+            }
             else if (!strcmp (uri, "about:") || !strcmp (uri, "about:version"))
             {
                 gchar* arguments = g_strjoinv (" ", sokoke_get_argv (NULL));