shell: Unset sort terms when search entry is programatically cleared

Otherwise items would keep the previous search sort order when going
back to the overview.
This commit is contained in:
Rui Matos 2014-12-02 14:14:56 +01:00
parent 25eab35333
commit d93c51f228

View file

@ -604,7 +604,10 @@ search_entry_changed_cb (GtkEntry *entry,
/* if the entry text was set manually (not by the user) */ /* if the entry text was set manually (not by the user) */
if (!g_strcmp0 (priv->filter_string, gtk_entry_get_text (entry))) if (!g_strcmp0 (priv->filter_string, gtk_entry_get_text (entry)))
{
cc_shell_model_set_sort_terms (CC_SHELL_MODEL (priv->store), NULL);
return; return;
}
/* Don't re-filter for added trailing or leading spaces */ /* Don't re-filter for added trailing or leading spaces */
str = cc_util_normalize_casefold_and_unaccent (gtk_entry_get_text (entry)); str = cc_util_normalize_casefold_and_unaccent (gtk_entry_get_text (entry));