[gnome-photos/wip/rishi/collection: 2/6] embed: Remove redundant code



commit 6a75da6166805cdd97dc3e0e22c5907b0d6109d4
Author: Debarshi Ray <debarshir gnome org>
Date:   Fri Aug 18 14:50:18 2017 +0200

    embed: Remove redundant code
    
    The active search type is already set to "all" by OverviewSearchbar
    when it gets hidden by photos_embed_save_search.
    
    Fallout from ee3a5edb69987ce6a28d6bb29a6f7f98aafa91c1

 src/photos-embed.c |   12 ++----------
 1 files changed, 2 insertions(+), 10 deletions(-)
---
diff --git a/src/photos-embed.c b/src/photos-embed.c
index db37edc..1bff91c 100644
--- a/src/photos-embed.c
+++ b/src/photos-embed.c
@@ -350,21 +350,13 @@ photos_embed_active_collection_changed (PhotosBaseManager *manager, PhotosBaseIt
     }
   else
     {
-      PhotosSearchType *search_type;
       const gchar *str;
-      const gchar *id;
 
       photos_embed_save_search (self);
 
-      search_type = PHOTOS_SEARCH_TYPE (photos_base_manager_get_active_object (self->srch_mngr));
       str = photos_search_controller_get_string (self->srch_cntrlr);
-      id = photos_filterable_get_id (PHOTOS_FILTERABLE (search_type));
-
-      if (g_strcmp0 (str, "") != 0 || g_strcmp0 (id, "all") != 0)
-        {
-          photos_base_manager_set_active_object_by_id (self->srch_mngr, "all");
-          photos_search_controller_set_string (self->srch_cntrlr, "");
-        }
+      if (g_strcmp0 (str, "") != 0)
+        photos_search_controller_set_string (self->srch_cntrlr, "");
     }
 }
 


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