Commit 5defdad1 authored by Debarshi Ray's avatar Debarshi Ray
Browse files

embed, overview-searchbar: Simplify code

OverviewSearchbar unsets all the search criteria, except the search
string, when it gets hidden. There is no reason for it not to.

https://bugzilla.gnome.org/show_bug.cgi?id=786936
parent 7d908e40
......@@ -345,19 +345,9 @@ photos_embed_active_collection_changed (PhotosBaseManager *manager, PhotosBaseIt
return;
if (collection == NULL)
{
photos_embed_restore_search (self);
}
photos_embed_restore_search (self);
else
{
const gchar *str;
photos_embed_save_search (self);
str = photos_search_controller_get_string (self->srch_cntrlr);
if (g_strcmp0 (str, "") != 0)
photos_search_controller_set_string (self->srch_cntrlr, "");
}
photos_embed_save_search (self);
}
......
......@@ -102,6 +102,8 @@ photos_overview_searchbar_hide (PhotosSearchbar *searchbar)
photos_base_manager_set_active_object_by_id (self->srch_mtch_mngr, "all");
photos_base_manager_set_active_object_by_id (self->src_mngr, "all");
photos_search_controller_set_string (self->srch_cntrlr, "");
PHOTOS_SEARCHBAR_CLASS (photos_overview_searchbar_parent_class)->hide (searchbar);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment