[Xfce4-commits] <midori:master> Implement informative text for private browsing
Christian Dywan
noreply at xfce.org
Fri Jan 27 23:10:03 CET 2012
Updating branch refs/heads/master
to f1e168b56944735d0dd49580eb9242086c0ef533 (commit)
from 32eb583cb5386586f62384f128551339a4bf99b7 (commit)
commit f1e168b56944735d0dd49580eb9242086c0ef533
Author: Christian Dywan <christian at twotoasts.de>
Date: Fri Jan 27 21:36:59 2012 +0100
Implement informative text for private browsing
Internally about:private is shown when private browsing
is invoked without any URLs.
Fixes: https://bugs.launchpad.net/midori/+bug/768572
midori/main.c | 4 ++++
midori/midori-browser.c | 2 +-
midori/midori-view.c | 19 +++++++++++++++++++
3 files changed, 24 insertions(+), 1 deletions(-)
diff --git a/midori/main.c b/midori/main.c
index 24c01e5..4a92b0e 100644
--- a/midori/main.c
+++ b/midori/main.c
@@ -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");
diff --git a/midori/midori-browser.c b/midori/midori-browser.c
index ccecdad..e9a6223 100644
--- a/midori/midori-browser.c
+++ b/midori/midori-browser.c
@@ -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
diff --git a/midori/midori-view.c b/midori/midori-view.c
index 0fc02c5..a1907c8 100644
--- a/midori/midori-view.c
+++ b/midori/midori-view.c
@@ -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));
More information about the Xfce4-commits
mailing list