summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEduard Roccatello <eduard@roccatello.it>2006-04-29 20:00:19 +0000
committerEduard Roccatello <eduard@roccatello.it>2006-04-29 20:00:19 +0000
commit82d682e1eb0595e5946a49fa3d7983c3992f26b0 (patch)
treeb74f883be70803f41de3ad82d8a5c3aa3802951b /src
parent73eedc89f35ee81ad3f1ff7b6e2fb40f05b37fed (diff)
downloadxfce4-appfinder-82d682e1eb0595e5946a49fa3d7983c3992f26b0.tar.gz
Bug fix on search. Missing casefolding and AND instead of OR. Added search on executable command
(Old svn revision: 21366)
Diffstat (limited to 'src')
-rw-r--r--src/xfce4-appfinder.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/xfce4-appfinder.c b/src/xfce4-appfinder.c
index e959882..99c426e 100644
--- a/src/xfce4-appfinder.c
+++ b/src/xfce4-appfinder.c
@@ -380,8 +380,14 @@ xfce_appfinder_list_add (gchar *name, XfceAppfinderCacheEntry *entry, XfceAppfin
if (param->psearch)
{
- if (!(entry->comment && g_pattern_match_string (param->psearch, g_utf8_casefold(entry->comment, -1))) &&
- !g_pattern_match_string (param->psearch, name))
+ if (!(
+ entry->comment &&
+ (
+ g_pattern_match_string (param->psearch, g_utf8_casefold(entry->comment, -1)) ||
+ g_pattern_match_string (param->psearch, g_utf8_casefold(name, -1)) ||
+ g_pattern_match_string (param->psearch, g_utf8_casefold(entry->exec, -1))
+ )
+ ))
{
return;
}
@@ -417,7 +423,7 @@ load_desktop_resources (gint category, gchar *pattern, XfceAppfinder *appfinder)
if (pattern != NULL)
{
- tmp = g_strconcat("*", g_utf8_casefold(pattern, -1), "*", NULL);
+ tmp = g_strconcat("*", pattern, "*", NULL);
psearch = g_pattern_spec_new (tmp);
g_free(tmp);
}
@@ -599,7 +605,7 @@ xfce_appfinder_search (XfceAppfinder *appfinder, const gchar *pattern)
GtkTreeSortable *sortable;
GtkListStore *liststore;
GtkTreeIter iter;
- gchar *text = g_utf8_strdown(pattern, -1);
+ gchar *text = g_utf8_casefold(pattern, -1);
showedcat = APPFINDER_ALL;
liststore = GTK_LIST_STORE(gtk_tree_view_get_model(GTK_TREE_VIEW(appfinder->appsTree)));