summaryrefslogtreecommitdiff
path: root/shell/cc-window.c
diff options
context:
space:
mode:
authorRui Matos <tiagomatos@gmail.com>2014-04-26 23:11:47 +0200
committerRui Matos <tiagomatos@gmail.com>2014-05-16 11:59:48 +0200
commit13abc75273922e01b2987d483c1bb4a20de44d86 (patch)
treec0aed218372c8d79b5a1bf8d9009d80c6293a04c /shell/cc-window.c
parent98a2ab2603a8fe905fa1144c5de818a60fe75cb6 (diff)
downloadgnome-control-center-13abc75273922e01b2987d483c1bb4a20de44d86.tar.gz
shell: Make search results sorting smarter
Instead of just sorting by the name the sort order will now be: 1. Panels whose name match a search term 2. Panels whose keywords match the most search terms 3. Panels whose description match the most search terms 4. The remaining panels by name https://bugzilla.gnome.org/show_bug.cgi?id=729027
Diffstat (limited to 'shell/cc-window.c')
-rw-r--r--shell/cc-window.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/shell/cc-window.c b/shell/cc-window.c
index d091e7938..8da464521 100644
--- a/shell/cc-window.c
+++ b/shell/cc-window.c
@@ -621,6 +621,8 @@ search_entry_changed_cb (GtkEntry *entry,
g_strfreev (priv->filter_terms);
priv->filter_terms = g_strsplit (priv->filter_string, " ", -1);
+ cc_shell_model_set_sort_terms (CC_SHELL_MODEL (priv->store), priv->filter_terms);
+
if (!g_strcmp0 (priv->filter_string, ""))
{
shell_show_overview_page (center);