app-system: Consider usage frequency in search results

Application search results are internally categorized in four sets,
multiple and single prefix matches and multiple and single substring
matches. Each set is currently sorted alphabetically by application
name when concatenating the sets to the final result.
Change the last step to sort each set by usage frequency instead,
which is more likely to favor the most relevant match than
"arbitrary" alphabetic order.

https://bugzilla.gnome.org/show_bug.cgi?id=623372
This commit is contained in:
Florian Müllner
2011-10-05 16:44:50 +02:00
parent 85520e34ab
commit da83ad561b
3 changed files with 54 additions and 8 deletions

View File

@ -30,6 +30,10 @@ ShellAppUsage* shell_app_usage_get_default(void);
GSList *shell_app_usage_get_most_used (ShellAppUsage *usage,
const char *context,
gint max_count);
int shell_app_usage_compare (ShellAppUsage *self,
const char *context,
ShellApp *app_a,
ShellApp *app_b);
G_END_DECLS