[gnome-photos/wip/rishi/collection: 5/39] search-type-manager: Set "all" as the active SearchType on startup
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos/wip/rishi/collection: 5/39] search-type-manager: Set "all" as the active SearchType on startup
- Date: Wed, 24 Jan 2018 20:02:38 +0000 (UTC)
commit f0a6080b86c5b2ab6f73ce77ec217f0106bd77f8
Author: Debarshi Ray <debarshir gnome org>
Date: Mon Jan 22 00:37:41 2018 +0100
search-type-manager: Set "all" as the active SearchType on startup
While the removal of PHOTOS_SEARCH_TYPE_STOCK_ALL in commit
3d4f17a87a4da got reverted in commit f92a2c9d4f364, it still continued
to set "photos", not "all" as the active SearchType on startup.
(Note that the active SearchType only matters for SEARCH because the
other modes explicitly specify which SearchType they want through the
QueryFlags.)
Even though it was being initialized to "photos", SEARCH still worked
because Searchbar happened to set it to "all" as a side-effect of
synchronizing its own visibility to the state of the "app.search"
GAction. It is better to not rely on such happy coincidences.
A subsequent commit will an IMPORT mode to show the contents of an
attached device. Setting "all" as the active SearchType on startup
will make it possible to assert that there are no remnants of an
earlier search lingering around after moving to IMPORT.
Fallout from f92a2c9d4f364e26b13c0aadca8cdf1d386f4fbc and
3d4f17a87a4da426c861057e989602387ece83fb
https://bugzilla.gnome.org/show_bug.cgi?id=751212
src/photos-search-type-manager.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/photos-search-type-manager.c b/src/photos-search-type-manager.c
index 4adc6625..25f856e9 100644
--- a/src/photos-search-type-manager.c
+++ b/src/photos-search-type-manager.c
@@ -147,7 +147,7 @@ photos_search_type_manager_init (PhotosSearchTypeManager *self)
photos_base_manager_add_object (PHOTOS_BASE_MANAGER (self), G_OBJECT (search_type));
g_object_unref (search_type);
- photos_base_manager_set_active_object_by_id (PHOTOS_BASE_MANAGER (self), PHOTOS_SEARCH_TYPE_STOCK_PHOTOS);
+ photos_base_manager_set_active_object_by_id (PHOTOS_BASE_MANAGER (self), PHOTOS_SEARCH_TYPE_STOCK_ALL);
g_free (item_filter);
g_free (all_filter);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]