[Xfce4-commits] <midori:master> Do address matches with a simple strstr for now

Christian Dywan noreply at xfce.org
Sun Nov 22 05:16:01 CET 2009


Updating branch refs/heads/master
         to a38574473f58d8f61d8bab8920562bb4440aaf5c (commit)
       from 818b6a990dee4b94882dc6dfa7e25c299bc360b3 (commit)

commit a38574473f58d8f61d8bab8920562bb4440aaf5c
Author: Christian Dywan <christian at twotoasts.de>
Date:   Sat Nov 21 20:09:07 2009 +0100

    Do address matches with a simple strstr for now
    
    The way we originally folded strings didn't work in all cases of
    unicode strings and the last attempt to improve that broke it
    on some systems while it improved on others.
    So for now we go back to the safe way.

 midori/midori-locationaction.c |   20 ++------------------
 1 files changed, 2 insertions(+), 18 deletions(-)

diff --git a/midori/midori-locationaction.c b/midori/midori-locationaction.c
index a99d7eb..16057ca 100644
--- a/midori/midori-locationaction.c
+++ b/midori/midori-locationaction.c
@@ -735,8 +735,6 @@ midori_location_entry_completion_match_cb (GtkEntryCompletion* completion,
     gchar* uri;
     gchar* title;
     gboolean match;
-    gchar* temp;
-    gchar* ftemp;
 
     model = gtk_entry_completion_get_model (completion);
     gtk_tree_model_get (model, iter, URI_COL, &uri, TITLE_COL, &title, -1);
@@ -744,25 +742,11 @@ midori_location_entry_completion_match_cb (GtkEntryCompletion* completion,
     match = FALSE;
     if (G_LIKELY (uri))
     {
-        gchar* ckey = g_utf8_collate_key (key, -1);
-        gchar* fkey = g_utf8_casefold (ckey, -1);
-        g_free (ckey);
-        temp = g_utf8_collate_key (uri, -1);
-        ftemp = g_utf8_casefold (temp, -1);
-        g_free (temp);
-        match = (strstr (ftemp, fkey) != NULL);
-        g_free (ftemp);
+        match = strstr (uri, key) != NULL;
         g_free (uri);
 
         if (!match && G_LIKELY (title))
-        {
-            temp = g_utf8_collate_key (title, -1);
-            ftemp = g_utf8_casefold (temp, -1);
-            g_free (temp);
-            match = (strstr (ftemp, fkey) != NULL);
-            g_free (ftemp);
-        }
-        g_free (fkey);
+            match = strstr (title, key) != NULL;
     }
 
     g_free (title);



More information about the Xfce4-commits mailing list