From beec33b028bdeb5f0da6ed51305f32e3b8041f6e Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Tue, 31 Dec 2002 11:11:13 +0000 Subject: Remove hidden filtering page. 2002-12-31 Marco Pesenti Gritti * data/glade/prefs-dialog.glade: Remove hidden filtering page. * embed/ephy-history.c: (ephy_history_autocompletion_source_foreach), (ephy_history_init), (ephy_history_add_host), (ephy_history_visited), (ephy_history_get_page_visits): * lib/ephy-autocompletion.c: (ephy_autocompletion_refine_matches), (ephy_autocompletion_update_matches_full_item): * src/bookmarks/ephy-bookmarks.c: (ephy_bookmarks_autocompletion_source_foreach): Fix memory corruption in bookmarks refine. Implement history autocompletion score. Smarter host matching code. Add some sanity checks. --- lib/ephy-autocompletion.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lib/ephy-autocompletion.c') diff --git a/lib/ephy-autocompletion.c b/lib/ephy-autocompletion.c index a3f3348c1..265590003 100644 --- a/lib/ephy-autocompletion.c +++ b/lib/ephy-autocompletion.c @@ -369,8 +369,10 @@ ephy_autocompletion_refine_matches (EphyAutocompletion *ac) for (i = 0; i < oldmatches.num_matches; i++) { EphyAutocompletionMatch *mi = &oldmatches.array[i]; + if (mi->is_action || (mi->substring && g_strrstr (mi->match, p->keys[0])) || + (mi->substring && g_strrstr (mi->title, p->keys[0])) || !strncmp (key0, mi->title + mi->offset, key0l)) { acma_append (&newmatches, mi, mi->is_action); @@ -425,7 +427,8 @@ ephy_autocompletion_update_matches_full_item (EphyAutocompletionSource *source, EphyAutocompletionPrivate *p) { if (is_action || - (substring && g_strrstr (item, p->keys[0]))) + (substring && g_strrstr (item, p->keys[0])) || + (substring && g_strrstr (title, p->keys[0]))) { EphyAutocompletionMatch m; m.match = item; -- cgit