[gnome-photos/wip/rishi/item-manager: 6/7] item-manager: adjust remove object vfunc
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos/wip/rishi/item-manager: 6/7] item-manager: adjust remove object vfunc
- Date: Mon, 15 Aug 2016 10:28:17 +0000 (UTC)
commit 62556357c460d8871cdd71233514ce66499c879c
Author: Umang Jain <mailumangjain gmail com>
Date: Sun Jul 31 03:10:12 2016 +0530
item-manager: adjust remove object vfunc
src/photos-item-manager.c | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
---
diff --git a/src/photos-item-manager.c b/src/photos-item-manager.c
index cadbfef..b6827dd 100644
--- a/src/photos-item-manager.c
+++ b/src/photos-item-manager.c
@@ -327,6 +327,7 @@ photos_item_manager_remove_object_by_id (PhotosBaseManager *mngr, const gchar *i
{
PhotosItemManager *self = PHOTOS_ITEM_MANAGER (mngr);
gpointer *collection;
+ guint i;
if (id == NULL)
goto end;
@@ -338,7 +339,16 @@ photos_item_manager_remove_object_by_id (PhotosBaseManager *mngr, const gchar *i
g_hash_table_remove (self->collections, id);
end:
- PHOTOS_BASE_MANAGER_CLASS (photos_item_manager_parent_class)->remove_object_by_id (mngr, id);
+ for (i = 0; self->item_mngr_chldrn[i] != NULL; i++)
+ {
+ PhotosBaseItem *item;
+
+ item = PHOTOS_BASE_ITEM (photos_base_manager_get_object_by_id (self->item_mngr_chldrn[i], id));
+ if (item != NULL)
+ break;
+ }
+
+ PHOTOS_BASE_MANAGER_CLASS (photos_item_manager_parent_class)->remove_object_by_id
(self->item_mngr_chldrn[i], id);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]