aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDiego Escalante Urrelo <diegoe@src.gnome.org>2007-12-27 02:38:42 +0800
committerDiego Escalante Urrelo <diegoe@src.gnome.org>2007-12-27 02:38:42 +0800
commit0b39aeca159fdd8126cb7423dbe8753bf1b5c1e7 (patch)
tree066e713bbc2ac3fe2c3e4bdd92719cf9b98b3202 /src
parent621364b0b056eabdd791f12c7f3bd5bc218cb605 (diff)
downloadgsoc2013-epiphany-0b39aeca159fdd8126cb7423dbe8753bf1b5c1e7.tar
gsoc2013-epiphany-0b39aeca159fdd8126cb7423dbe8753bf1b5c1e7.tar.gz
gsoc2013-epiphany-0b39aeca159fdd8126cb7423dbe8753bf1b5c1e7.tar.bz2
gsoc2013-epiphany-0b39aeca159fdd8126cb7423dbe8753bf1b5c1e7.tar.lz
gsoc2013-epiphany-0b39aeca159fdd8126cb7423dbe8753bf1b5c1e7.tar.xz
gsoc2013-epiphany-0b39aeca159fdd8126cb7423dbe8753bf1b5c1e7.tar.zst
gsoc2013-epiphany-0b39aeca159fdd8126cb7423dbe8753bf1b5c1e7.zip
Have the completion func also check the bookmark URLs for matches as it does
with history items. Fixes bug #505683. svn path=/trunk/; revision=7827
Diffstat (limited to 'src')
-rw-r--r--src/ephy-location-action.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/ephy-location-action.c b/src/ephy-location-action.c
index b244389fa..3d7ef7838 100644
--- a/src/ephy-location-action.c
+++ b/src/ephy-location-action.c
@@ -150,8 +150,8 @@ completion_func (GtkEntryCompletion *completion,
{
int i, len_key, len_prefix;
char *item = NULL;
- char *keywords = NULL;
char *url = NULL;
+ char *keywords = NULL;
gboolean ret = FALSE;
GtkTreeModel *model;
GtkTreeIter iter2;
@@ -163,8 +163,8 @@ completion_func (GtkEntryCompletion *completion,
gtk_tree_model_get (model, iter,
EPHY_COMPLETION_TEXT_COL, &item,
- EPHY_COMPLETION_KEYWORDS_COL, &keywords,
EPHY_COMPLETION_URL_COL, &url,
+ EPHY_COMPLETION_KEYWORDS_COL, &keywords,
-1);
len_key = strlen (key);
@@ -176,6 +176,10 @@ completion_func (GtkEntryCompletion *completion,
{
ret = TRUE;
}
+ else if (!strncasecmp (key, url, len_key))
+ {
+ ret = TRUE;
+ }
else
{
for (i = 0; i < G_N_ELEMENTS (web_prefixes); i++)
@@ -187,6 +191,13 @@ completion_func (GtkEntryCompletion *completion,
ret = TRUE;
break;
}
+ else if (!strncmp (web_prefixes[i].prefix, url, len_prefix) &&
+ !strncasecmp (key, url + len_prefix, len_key))
+ {
+ ret = TRUE;
+ break;
+ }
+
}
}
@@ -206,8 +217,8 @@ completion_func (GtkEntryCompletion *completion,
ret = FALSE;
g_free (item);
- g_free (keywords);
g_free (url);
+ g_free (keywords);
return ret;
}