[gnome-photos/wip/rishi/collection: 4/42] overview-searchbar: Ignore	Filterables that are not search criteria
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc: 
- Subject: [gnome-photos/wip/rishi/collection: 4/42] overview-searchbar: Ignore	Filterables that are not search criteria
- Date: Thu, 25 Jan 2018 03:16:14 +0000 (UTC)
commit 205d2db77f2b502e4aa0f8a6bc2d13f9b856f4df
Author: Debarshi Ray <debarshir gnome org>
Date:   Tue Jan 23 11:14:38 2018 +0100
    overview-searchbar: Ignore Filterables that are not search criteria
    
    https://bugzilla.gnome.org/show_bug.cgi?id=751212
 src/photos-overview-searchbar.c | 6 ++++++
 1 file changed, 6 insertions(+)
---
diff --git a/src/photos-overview-searchbar.c b/src/photos-overview-searchbar.c
index 51c1579a..7890ae1f 100644
--- a/src/photos-overview-searchbar.c
+++ b/src/photos-overview-searchbar.c
@@ -66,6 +66,9 @@ photos_overview_searchbar_active_changed (PhotosOverviewSearchbar *self,
   g_autofree gchar *name = NULL;
 
   object = photos_base_manager_get_active_object (mngr);
+  if (!photos_filterable_is_search_criterion (PHOTOS_FILTERABLE (object)))
+    goto out;
+
   id = photos_filterable_get_id (PHOTOS_FILTERABLE (object));
   g_object_get (object, "name", &name, NULL);
 
@@ -78,6 +81,9 @@ photos_overview_searchbar_active_changed (PhotosOverviewSearchbar *self,
     }
 
   gtk_entry_grab_focus_without_selecting (GTK_ENTRY (self->search_entry));
+
+ out:
+  return;
 }
 
 
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]