aboutsummaryrefslogtreecommitdiffstats
path: root/lib/widgets
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 /lib/widgets
parent813993d057e19bf9f7b1c091d165026c6dad8a41 (diff)
downloadgsoc2013-epiphany-89cd6749b82686ca78e8d44c5b3fb18fead02363.tar
gsoc2013-epiphany-89cd6749b82686ca78e8d44c5b3fb18fead02363.tar.gz
gsoc2013-epiphany-89cd6749b82686ca78e8d44c5b3fb18fead02363.tar.bz2
gsoc2013-epiphany-89cd6749b82686ca78e8d44c5b3fb18fead02363.tar.lz
gsoc2013-epiphany-89cd6749b82686ca78e8d44c5b3fb18fead02363.tar.xz
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 'lib/widgets')
-rw-r--r--lib/widgets/ephy-location-entry.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/lib/widgets/ephy-location-entry.c b/lib/widgets/ephy-location-entry.c
index 79c921fcb..cb8d9b363 100644
--- a/lib/widgets/ephy-location-entry.c
+++ b/lib/widgets/ephy-location-entry.c
@@ -32,6 +32,7 @@
#include "ephy-stock-icons.h"
#include "ephy-debug.h"
#include "ephy-gui.h"
+#include "ephy-request-about.h"
#include <glib/gi18n.h>
#include <gdk/gdkkeysyms.h>
@@ -1049,6 +1050,12 @@ textcell_data_func (GtkCellLayout *cell_layout,
if (url)
{
+ /* Do not show internal ephy-about: protocol to users */
+ if (g_str_has_prefix (url, EPHY_ABOUT_SCHEME)) {
+ g_free (url);
+ url = g_strdup_printf ("about:%s", url + strlen (EPHY_ABOUT_SCHEME) + 1);
+ }
+
ctext = g_strdup_printf ("%s\n%s", title, url);
style = gtk_widget_get_style_context (priv->entry);
@@ -1278,7 +1285,7 @@ ephy_location_entry_set_location (EphyLocationEntry *entry,
EphyLocationEntryPrivate *priv = entry->priv;
GtkClipboard *clipboard;
const char *text;
- char* selection = NULL;
+ char *effective_text = NULL, *selection = NULL;
int start, end;
/* Setting a new text will clear the clipboard. This makes it impossible
@@ -1303,6 +1310,9 @@ ephy_location_entry_set_location (EphyLocationEntry *entry,
if (address != NULL && strcmp (address, "about:blank") != 0)
{
+ if (g_str_has_prefix (address, EPHY_ABOUT_SCHEME))
+ effective_text = g_strdup_printf ("about:%s",
+ address + strlen (EPHY_ABOUT_SCHEME) + 1);
text = address;
}
else
@@ -1311,11 +1321,12 @@ ephy_location_entry_set_location (EphyLocationEntry *entry,
}
/* First record the new hash, then update the entry text */
- priv->hash = g_str_hash (text);
+ priv->hash = g_str_hash (effective_text ? effective_text : text);
priv->block_update = TRUE;
- gtk_entry_set_text (GTK_ENTRY (priv->entry), text);
+ gtk_entry_set_text (GTK_ENTRY (priv->entry), effective_text ? effective_text : text);
priv->block_update = FALSE;
+ g_free (effective_text);
/* We need to call update_address_state() here, as the 'changed' signal
* may not get called if the user has typed in the exact correct url */