aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--data/Makefile.am3
-rw-r--r--data/incognito.pngbin0 -> 8445 bytes
-rw-r--r--data/pages/about.css26
-rw-r--r--embed/ephy-about-handler.c42
-rw-r--r--embed/ephy-embed-utils.c1
5 files changed, 71 insertions, 1 deletions
diff --git a/data/Makefile.am b/data/Makefile.am
index a95a3800e..6449caa31 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -53,7 +53,8 @@ $(default_bookmarks_DATA): $(default_bookmarks_in_files) Makefile $(INTLTOOL_MER
iconsdir = $(pkgdatadir)/icons
dist_icons_DATA = \
missing-thumbnail.png \
- thumbnail-frame.png
+ thumbnail-frame.png \
+ incognito.png
EXTRA_DIST = \
$(aboutdialog_DATA) \
diff --git a/data/incognito.png b/data/incognito.png
new file mode 100644
index 000000000..8aa292925
--- /dev/null
+++ b/data/incognito.png
Binary files differ
diff --git a/data/pages/about.css b/data/pages/about.css
index 6e563d617..7f349d946 100644
--- a/data/pages/about.css
+++ b/data/pages/about.css
@@ -133,3 +133,29 @@ body {
.applications-body .appname { font-weight: bold; }
.applications-body .appurl, td.date { color: #babdb6; }
.applications-body input { width: 100%; padding: 8px; }
+
+/* about:incognito */
+
+.incognito-body {
+ margin: 0;
+ padding: 0;
+}
+
+.incognito-body div#mainblock {
+ display: table;
+ max-width: 40em;
+ margin-left: auto;
+ margin-right: auto;
+ height: 75%;
+}
+
+.incognito-body div#mainblock>div {
+ margin: 0 10px;
+ display: table-cell;
+ vertical-align: middle;
+ padding: 0 20px 0 160px;
+}
+
+.incognito-body h1 {
+ color: #888a85;
+}
diff --git a/embed/ephy-about-handler.c b/embed/ephy-about-handler.c
index e9328a118..9955d36e5 100644
--- a/embed/ephy-about-handler.c
+++ b/embed/ephy-about-handler.c
@@ -21,6 +21,7 @@
#include "config.h"
#include "ephy-about-handler.h"
+#include "ephy-embed-shell.h"
#include "ephy-file-helpers.h"
#include "ephy-smaps.h"
#include "ephy-web-app-utils.h"
@@ -239,6 +240,43 @@ ephy_about_handler_handle_applications (GString *data_str)
ephy_web_application_free_application_list (applications);
}
+static void
+ephy_about_handler_handle_incognito (GString *data_str)
+{
+ const char *filename;
+ char *img_data = NULL, *img_data_base64 = NULL;
+ gsize data_length;
+
+ filename = ephy_file ("incognito.png");
+ if (filename) {
+ g_file_get_contents (filename, &img_data, &data_length, NULL);
+ img_data_base64 = g_base64_encode ((guchar*)img_data, data_length);
+ }
+ g_string_append_printf (data_str, \
+ "<head>\n" \
+ "<title>%s</title>\n" \
+ "<style type=\"text/css\">%s</style>\n" \
+ "</head>\n" \
+ "<body class=\"incognito-body\">\n" \
+ " <div id=\"mainblock\">\n" \
+ " <div style=\"background: transparent url(data:image/png;base64,%s) no-repeat 10px center;\">\n" \
+ " <h1>%s</h1>\n" \
+ " <p>%s</p>\n" \
+ " </div>\n" \
+ " </div>\n" \
+ "</body>\n",
+ _("Private Browsing"),
+ css_style, img_data_base64 ? img_data_base64 : "",
+ _("Private Browsing"),
+ _("You are currently browsing <em>incognito</em>. Pages viewed in this "
+ "mode will not show up in your browsing history and all stored "
+ "information will be cleared when you close the window."));
+
+ g_free (img_data_base64);
+ g_free (img_data);
+
+}
+
GString *
ephy_about_handler_handle (const char *about)
{
@@ -254,6 +292,10 @@ ephy_about_handler_handle (const char *about)
ephy_about_handler_handle_epiphany (data_str);
else if (!g_strcmp0 (about, "applications"))
ephy_about_handler_handle_applications (data_str);
+ else if (!g_strcmp0 (about, "incognito") &&
+ ephy_embed_shell_get_mode (ephy_embed_shell_get_default ())
+ == EPHY_EMBED_SHELL_MODE_INCOGNITO)
+ ephy_about_handler_handle_incognito (data_str);
g_string_append (data_str, "</html>");
diff --git a/embed/ephy-embed-utils.c b/embed/ephy-embed-utils.c
index 626c1bd9e..80a28bc70 100644
--- a/embed/ephy-embed-utils.c
+++ b/embed/ephy-embed-utils.c
@@ -167,6 +167,7 @@ ephy_embed_utils_url_is_empty (const char *location)
* window's location entry. */
static const char * do_not_show_address[] = {
"about:blank",
+ "ephy-about:incognito",
"ephy-about:overview",
NULL
};