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
This commit is contained in:
parent
32eb583cb5
commit
f1e168b569
3 changed files with 24 additions and 1 deletions
|
@ -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)
|
if (midori_browser_get_current_uri (browser) == NULL)
|
||||||
midori_browser_add_uri (browser, "about:blank");
|
midori_browser_add_uri (browser, "about:blank");
|
||||||
|
|
||||||
|
|
|
@ -2306,7 +2306,7 @@ _action_private_browsing_activate (GtkAction* action,
|
||||||
MidoriBrowser* browser)
|
MidoriBrowser* browser)
|
||||||
{
|
{
|
||||||
const gchar* uri = midori_browser_get_current_uri (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
|
static void
|
||||||
|
|
|
@ -3975,6 +3975,25 @@ midori_view_set_uri (MidoriView* view,
|
||||||
katze_assign (view->uri, g_strdup (uri));
|
katze_assign (view->uri, g_strdup (uri));
|
||||||
data = g_string_free (demo, FALSE);
|
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"))
|
else if (!strcmp (uri, "about:") || !strcmp (uri, "about:version"))
|
||||||
{
|
{
|
||||||
gchar* arguments = g_strjoinv (" ", sokoke_get_argv (NULL));
|
gchar* arguments = g_strjoinv (" ", sokoke_get_argv (NULL));
|
||||||
|
|
Loading…
Reference in a new issue