[gnome-photos] item-manager: Emit GListModel::items-changed
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos] item-manager: Emit GListModel::items-changed
- Date: Mon, 5 Dec 2016 12:59:36 +0000 (UTC)
commit 723e6cedddb0149d8dc2dbc18535b467fcc1f85b
Author: Debarshi Ray <debarshir gnome org>
Date: Sat Dec 3 10:25:23 2016 +0100
item-manager: Emit GListModel::items-changed
https://bugzilla.gnome.org/show_bug.cgi?id=774191
src/photos-item-manager.c | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/src/photos-item-manager.c b/src/photos-item-manager.c
index 62645a7..7699cc0 100644
--- a/src/photos-item-manager.c
+++ b/src/photos-item-manager.c
@@ -465,6 +465,13 @@ photos_item_manager_item_load (GObject *source_object, GAsyncResult *res, gpoint
static void
+photos_item_manager_items_changed (PhotosItemManager *self, guint position, guint removed, guint added)
+{
+ g_list_model_items_changed (G_LIST_MODEL (self), position, removed, added);
+}
+
+
+static void
photos_item_manager_remove_object_by_id (PhotosBaseManager *mngr, const gchar *id)
{
PhotosItemManager *self = PHOTOS_ITEM_MANAGER (mngr);
@@ -676,6 +683,11 @@ photos_item_manager_init (PhotosItemManager *self)
for (i = 0; i < window_mode_class->n_values; i++)
self->item_mngr_chldrn[i] = photos_base_manager_new ();
+ g_signal_connect_swapped (self->item_mngr_chldrn[0],
+ "items-changed",
+ G_CALLBACK (photos_item_manager_items_changed),
+ self);
+
self->mode = PHOTOS_WINDOW_MODE_NONE;
self->monitor = photos_tracker_change_monitor_dup_singleton (NULL, NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]