[Xfce4-commits] <midori:master> Back to case folding and handling completion actions properly
Christian Dywan
noreply at xfce.org
Mon Nov 23 20:58:02 CET 2009
Updating branch refs/heads/master
to c26d1775e9bbd781bf12756458ce0a11027510e8 (commit)
from e5cb4bb38335f17053afae02b4ee646a67ce93c9 (commit)
commit c26d1775e9bbd781bf12756458ce0a11027510e8
Author: Christian Dywan <christian at twotoasts.de>
Date: Mon Nov 23 20:41:10 2009 +0100
Back to case folding and handling completion actions properly
midori/midori-locationaction.c | 18 +++++++++++++-----
1 files changed, 13 insertions(+), 5 deletions(-)
diff --git a/midori/midori-locationaction.c b/midori/midori-locationaction.c
index 16057ca..6c06a0e 100644
--- a/midori/midori-locationaction.c
+++ b/midori/midori-locationaction.c
@@ -742,11 +742,20 @@ midori_location_entry_completion_match_cb (GtkEntryCompletion* completion,
match = FALSE;
if (G_LIKELY (uri))
{
- match = strstr (uri, key) != NULL;
+ gchar* fkey = g_utf8_casefold (key, -1);
+ gchar* furi = g_utf8_casefold (uri, -1);
g_free (uri);
+ match = strstr (furi, fkey) != NULL;
+ g_free (furi);
if (!match && G_LIKELY (title))
- match = strstr (title, key) != NULL;
+ {
+ gchar* ftitle = g_utf8_casefold (title, -1);
+ match = strstr (ftitle, fkey) != NULL;
+ g_free (ftitle);
+ }
+
+ g_free (fkey);
}
g_free (title);
@@ -1414,11 +1423,10 @@ midori_location_action_set_search_engines (MidoriLocationAction* location_action
completion = gtk_entry_get_completion (GTK_ENTRY (child));
i = 0;
if (location_action->search_engines)
- {
while ((item = katze_array_get_nth_item (location_action->search_engines, i++)))
gtk_entry_completion_delete_action (completion, 0);
- midori_location_action_add_actions (completion, search_engines);
- }
+
+ midori_location_action_add_actions (completion, search_engines);
}
katze_object_assign (location_action->search_engines, search_engines);
More information about the Xfce4-commits
mailing list