[gnome-photos/wip/rishi/collection: 23/27] embed: Rename a variable



commit c18993e892bf64da1b6bd50476e5bbd213d5b086
Author: Debarshi Ray <debarshir gnome org>
Date:   Tue Jan 16 17:43:23 2018 +0100

    embed: Rename a variable
    
    Embed wasn't listening to SearchMatchManager signals. Before fixing
    that in a subsequent commit, rename the SearchTypeManager pointer for
    clarity and consistency.

 src/photos-embed.c | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)
---
diff --git a/src/photos-embed.c b/src/photos-embed.c
index 4814ca6e..1969579c 100644
--- a/src/photos-embed.c
+++ b/src/photos-embed.c
@@ -80,7 +80,7 @@ struct _PhotosEmbed
   GtkWidget *toolbar;
   PhotosBaseManager *item_mngr;
   PhotosBaseManager *src_mngr;
-  PhotosBaseManager *srch_mngr;
+  PhotosBaseManager *srch_typ_mngr;
   PhotosEmbedSearchState search_state;
   PhotosModeController *mode_cntrlr;
   PhotosSearchController *srch_cntrlr;
@@ -100,8 +100,8 @@ static void
 photos_embed_block_search_changed (PhotosEmbed *self)
 {
   g_signal_handlers_block_by_func (self->src_mngr, photos_embed_search_changed, self);
-  g_signal_handlers_block_by_func (self->srch_mngr, photos_embed_search_changed, self);
   g_signal_handlers_block_by_func (self->srch_cntrlr, photos_embed_search_changed, self);
+  g_signal_handlers_block_by_func (self->srch_typ_mngr, photos_embed_search_changed, self);
 }
 
 
@@ -109,8 +109,8 @@ static void
 photos_embed_unblock_search_changed (PhotosEmbed *self)
 {
   g_signal_handlers_unblock_by_func (self->src_mngr, photos_embed_search_changed, self);
-  g_signal_handlers_unblock_by_func (self->srch_mngr, photos_embed_search_changed, self);
   g_signal_handlers_unblock_by_func (self->srch_cntrlr, photos_embed_search_changed, self);
+  g_signal_handlers_unblock_by_func (self->srch_typ_mngr, photos_embed_search_changed, self);
 }
 
 
@@ -196,7 +196,7 @@ photos_embed_restore_search (PhotosEmbed *self)
 
   photos_embed_block_search_changed (self);
   photos_base_manager_set_active_object (self->src_mngr, self->search_state.source);
-  photos_base_manager_set_active_object (self->srch_mngr, self->search_state.search_type);
+  photos_base_manager_set_active_object (self->srch_typ_mngr, self->search_state.search_type);
   photos_search_controller_set_string (self->srch_cntrlr, self->search_state.str);
   photos_embed_unblock_search_changed (self);
 
@@ -219,7 +219,7 @@ photos_embed_save_search (PhotosEmbed *self)
   photos_embed_clear_search (self);
 
   self->search_state.source = g_object_ref (photos_base_manager_get_active_object (self->src_mngr));
-  self->search_state.search_type = g_object_ref (photos_base_manager_get_active_object (self->srch_mngr));
+  self->search_state.search_type = g_object_ref (photos_base_manager_get_active_object 
(self->srch_typ_mngr));
   self->search_state.str = g_strdup (photos_search_controller_get_string (self->srch_cntrlr));
   self->search_state.saved = TRUE;
 
@@ -500,7 +500,7 @@ photos_embed_search_changed (PhotosEmbed *self)
   object = photos_base_manager_get_active_object (self->src_mngr);
   source_id = photos_filterable_get_id (PHOTOS_FILTERABLE (object));
 
-  object = photos_base_manager_get_active_object (self->srch_mngr);
+  object = photos_base_manager_get_active_object (self->srch_typ_mngr);
   search_type_id = photos_filterable_get_id (PHOTOS_FILTERABLE (object));
 
   str = photos_search_controller_get_string (self->srch_cntrlr);
@@ -679,7 +679,7 @@ photos_embed_dispose (GObject *object)
   g_clear_object (&self->ntfctn_mngr);
   g_clear_object (&self->item_mngr);
   g_clear_object (&self->src_mngr);
-  g_clear_object (&self->srch_mngr);
+  g_clear_object (&self->srch_typ_mngr);
   g_clear_object (&self->mode_cntrlr);
   g_clear_object (&self->srch_cntrlr);
   g_clear_object (&self->trk_ovrvw_cntrlr);
@@ -806,8 +806,8 @@ photos_embed_init (PhotosEmbed *self)
       photos_embed_source_manager_notification_show (self, source);
     }
 
-  self->srch_mngr = g_object_ref (state->srch_typ_mngr);
-  g_signal_connect_object (self->srch_mngr,
+  self->srch_typ_mngr = g_object_ref (state->srch_typ_mngr);
+  g_signal_connect_object (self->srch_typ_mngr,
                            "active-changed",
                            G_CALLBACK (photos_embed_search_changed),
                            self,


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