From 13abc75273922e01b2987d483c1bb4a20de44d86 Mon Sep 17 00:00:00 2001 From: Rui Matos Date: Sat, 26 Apr 2014 23:11:47 +0200 Subject: 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 --- shell/cc-window.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'shell/cc-window.c') 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); -- cgit v1.2.1