[gnome-photos] embed: Remove redundant code



commit 7d908e401253b62d06a76a70b32c6ed96e3dcab7
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
    
    https://bugzilla.gnome.org/show_bug.cgi?id=786936

 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]