shell-app-system: Ensure that we correctly order subsearches

As we use g_slist_prepend for efficiency when building the list
of results before ordering it, we need to make sure we traverse
the list of previous results backwards so that it's built in
the same order.

https://bugzilla.gnome.org/show_bug.cgi?id=693936
This commit is contained in:
Jasper St. Pierre 2013-02-15 23:17:44 -05:00
parent d8b7ac9044
commit 754df5ebe2

View File

@ -780,6 +780,8 @@ shell_app_system_subsearch (ShellAppSystem *system,
GSList *substring_results = NULL;
GSList *normalized_terms = normalize_terms (terms);
previous_results = g_slist_reverse (previous_results);
for (iter = previous_results; iter; iter = iter->next)
{
ShellApp *app = iter->data;