aboutsummaryrefslogtreecommitdiffstats
path: root/embed/ephy-history.c
diff options
context:
space:
mode:
authorSergio Villar Senin <svillar@igalia.com>2011-03-30 15:36:08 +0800
committerSergio Villar Senin <svillar@igalia.com>2011-06-01 22:00:59 +0800
commit89cd6749b82686ca78e8d44c5b3fb18fead02363 (patch)
tree0156a79859ec3a08a5e985d5d538c486980f1b47 /embed/ephy-history.c
parent813993d057e19bf9f7b1c091d165026c6dad8a41 (diff)
downloadgsoc2013-epiphany-89cd6749b82686ca78e8d44c5b3fb18fead02363.tar.gz
gsoc2013-epiphany-89cd6749b82686ca78e8d44c5b3fb18fead02363.tar.zst
gsoc2013-epiphany-89cd6749b82686ca78e8d44c5b3fb18fead02363.zip
Added about:plugins support.
We are now able to show a page with the list of installed plugins. Bug #575498
Diffstat (limited to 'embed/ephy-history.c')
-rw-r--r--embed/ephy-history.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/embed/ephy-history.c b/embed/ephy-history.c
index 86a4aaaf0..b6fe5dc4b 100644
--- a/embed/ephy-history.c
+++ b/embed/ephy-history.c
@@ -27,6 +27,7 @@
#include "ephy-node-db.h"
#include "ephy-node-common.h"
#include "ephy-prefs.h"
+#include "ephy-request-about.h"
#include "ephy-settings.h"
#include "ephy-string.h"
@@ -823,22 +824,30 @@ ephy_history_add_page (EphyHistory *eh,
static gboolean
impl_add_page (EphyHistory *eb,
- const char *url,
+ const char *orig_url,
gboolean redirect,
gboolean toplevel)
{
EphyNode *bm, *node, *host;
gulong flags = 0;
+ char *url;
if (eb->priv->enabled == FALSE)
{
return FALSE;
}
+ /* Do not show internal ephy-about: protocol to users */
+ if (g_str_has_prefix (orig_url, EPHY_ABOUT_SCHEME))
+ url = g_strdup_printf ("about:%s", orig_url + EPHY_ABOUT_SCHEME_LEN + 1);
+ else
+ url = g_strdup (orig_url);
+
node = ephy_history_get_page (eb, url);
if (node)
{
ephy_history_visited (eb, node);
+ g_free (url);
return TRUE;
}
@@ -846,6 +855,7 @@ impl_add_page (EphyHistory *eb,
ephy_node_set_property_string (bm, EPHY_NODE_PAGE_PROP_LOCATION, url);
ephy_node_set_property_string (bm, EPHY_NODE_PAGE_PROP_TITLE, url);
+ g_free (url);
if (redirect) flags |= REDIRECT_FLAG;
if (toplevel) flags |= TOPLEVEL_FLAG;