From f1e168b56944735d0dd49580eb9242086c0ef533 Mon Sep 17 00:00:00 2001 From: Christian Dywan Date: Fri, 27 Jan 2012 21:36:59 +0100 Subject: [PATCH] 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 deletion(-) diff --git a/midori/main.c b/midori/main.c index 24c01e59..4a92b0e3 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 ccecdad5..e9a62233 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 0fc02c59..a1907c82 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 ( + "%s" + "

%s

" + "

%s

" + "

%s

", + _("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)); -- 2.39.5