[gnome-photos/wip/rishi/collection: 8/45] base-manager: Only use search criteria Filterables in the "all" filter



commit 8588553ce3d3a174ad230849c708053af45acb5c
Author: Debarshi Ray <debarshir gnome org>
Date:   Mon Feb 12 12:11:27 2018 +0100

    base-manager: Only use search criteria Filterables in the "all" filter
    
    A subsequent commit will track GMounts representing USB storage and
    PTP devices and represent them as GMount-backed sources. These sources
    shouldn't contribute to the SourceManager's "all" filter. This demands
    finer control over the filter generation process.
    
    https://gitlab.gnome.org/GNOME/gnome-photos/issues/29

 src/photos-base-manager.c | 3 +++
 1 file changed, 3 insertions(+)
---
diff --git a/src/photos-base-manager.c b/src/photos-base-manager.c
index 0d84131e..601c4eab 100644
--- a/src/photos-base-manager.c
+++ b/src/photos-base-manager.c
@@ -620,6 +620,9 @@ photos_base_manager_get_all_filter (PhotosBaseManager *self)
       if (g_strcmp0 (id, "all") == 0)
         continue;
 
+      if (!photos_filterable_is_search_criterion (PHOTOS_FILTERABLE (object_data->object)))
+        continue;
+
       str = photos_filterable_get_filter (PHOTOS_FILTERABLE (object_data->object));
       if (g_strcmp0 (str, blank) == 0)
         g_free (str);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]