[gnome-photos] tracker-controller: Use PhotosCollectionManager
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos] tracker-controller: Use PhotosCollectionManager
- Date: Mon, 8 Apr 2013 13:26:01 +0000 (UTC)
commit 5c85f790e29ad27ae8c802b352f13bda334997b7
Author: Debarshi Ray <debarshir gnome org>
Date: Wed Apr 3 17:35:56 2013 +0200
tracker-controller: Use PhotosCollectionManager
src/photos-tracker-controller.c | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
---
diff --git a/src/photos-tracker-controller.c b/src/photos-tracker-controller.c
index 22b55d4..8006360 100644
--- a/src/photos-tracker-controller.c
+++ b/src/photos-tracker-controller.c
@@ -1,6 +1,6 @@
/*
* Photos - access, organize and share your photos on GNOME
- * Copyright © 2012 Red Hat, Inc.
+ * Copyright © 2012, 2013 Red Hat, Inc.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -28,6 +28,7 @@
#include <glib.h>
#include <glib/gi18n.h>
+#include "photos-collection-manager.h"
#include "photos-item-manager.h"
#include "photos-marshalers.h"
#include "photos-query-builder.h"
@@ -39,6 +40,7 @@
struct _PhotosTrackerControllerPrivate
{
GCancellable *cancellable;
+ PhotosBaseManager *col_mngr;
PhotosBaseManager *item_mngr;
PhotosBaseManager *src_mngr;
PhotosOffsetController *offset_cntrlr;
@@ -275,6 +277,7 @@ photos_tracker_controller_dispose (GObject *object)
PhotosTrackerController *self = PHOTOS_TRACKER_CONTROLLER (object);
PhotosTrackerControllerPrivate *priv = self->priv;
+ g_clear_object (&priv->col_mngr);
g_clear_object (&priv->item_mngr);
g_clear_object (&priv->src_mngr);
g_clear_object (&priv->offset_cntrlr);
@@ -308,6 +311,12 @@ photos_tracker_controller_init (PhotosTrackerController *self)
priv->cancellable = g_cancellable_new ();
priv->item_mngr = photos_item_manager_new ();
+ priv->col_mngr = photos_collection_manager_new ();
+ g_signal_connect (priv->col_mngr,
+ "active-changed",
+ G_CALLBACK (photos_tracker_controller_refresh_for_object),
+ self);
+
priv->src_mngr = photos_source_manager_new ();
g_signal_connect (priv->src_mngr,
"object-added",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]