[gnome-photos/wip/search: 31/32] tracker-search-controller: Use PhotosSeachTypeManager:active-changed



commit 75da340180ef3df0fcd4267fb73ad18e4183e393
Author: Debarshi Ray <debarshir gnome org>
Date:   Sun Jan 26 14:12:55 2014 +0100

    tracker-search-controller: Use PhotosSeachTypeManager:active-changed

 src/photos-tracker-search-controller.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/src/photos-tracker-search-controller.c b/src/photos-tracker-search-controller.c
index 8e7e665..319d207 100644
--- a/src/photos-tracker-search-controller.c
+++ b/src/photos-tracker-search-controller.c
@@ -28,6 +28,7 @@
 #include "photos-mode-controller.h"
 #include "photos-offset-search-controller.h"
 #include "photos-query-builder.h"
+#include "photos-search-type-manager.h"
 #include "photos-source-manager.h"
 #include "photos-tracker-search-controller.h"
 
@@ -35,6 +36,7 @@
 struct _PhotosTrackerSearchControllerPrivate
 {
   PhotosBaseManager *src_mngr;
+  PhotosBaseManager *srch_typ_mngr;
   PhotosOffsetController *offset_cntrlr;
 };
 
@@ -87,6 +89,7 @@ photos_tracker_search_controller_dispose (GObject *object)
   PhotosTrackerSearchControllerPrivate *priv = self->priv;
 
   g_clear_object (&priv->src_mngr);
+  g_clear_object (&priv->srch_typ_mngr);
   g_clear_object (&priv->offset_cntrlr);
 
   G_OBJECT_CLASS (photos_tracker_search_controller_parent_class)->dispose (object);
@@ -107,6 +110,12 @@ photos_tracker_search_controller_init (PhotosTrackerSearchController *self)
                             G_CALLBACK (photos_tracker_controller_refresh_for_object),
                             self);
 
+  priv->srch_typ_mngr = photos_search_type_manager_dup_singleton ();
+  g_signal_connect_swapped (priv->srch_typ_mngr,
+                            "active-changed",
+                            G_CALLBACK (photos_tracker_controller_refresh_for_object),
+                            self);
+
   priv->offset_cntrlr = photos_offset_search_controller_dup_singleton ();
 }
 


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