[gnome-photos/wip/rishi/view-model: 1/5] item-manager: Add photos_item_manager_get_for_mode
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos/wip/rishi/view-model: 1/5] item-manager: Add photos_item_manager_get_for_mode
- Date: Wed, 24 Aug 2016 17:17:40 +0000 (UTC)
commit 9e0d061894c556e06664d6c568fe9509dfa9448b
Author: Debarshi Ray <debarshir gnome org>
Date: Tue Aug 23 10:27:24 2016 +0200
item-manager: Add photos_item_manager_get_for_mode
src/photos-item-manager.c | 11 +++++++++++
src/photos-item-manager.h | 3 +++
2 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/src/photos-item-manager.c b/src/photos-item-manager.c
index 42e35bc..4c44da2 100644
--- a/src/photos-item-manager.c
+++ b/src/photos-item-manager.c
@@ -826,6 +826,17 @@ photos_item_manager_get_collections (PhotosItemManager *self)
}
+PhotosBaseManager *
+photos_item_manager_get_for_mode (PhotosItemManager *self, PhotosWindowMode mode)
+{
+ g_return_val_if_fail (mode != PHOTOS_WINDOW_MODE_NONE, NULL);
+ g_return_val_if_fail (mode != PHOTOS_WINDOW_MODE_EDIT, NULL);
+ g_return_val_if_fail (mode != PHOTOS_WINDOW_MODE_PREVIEW, NULL);
+
+ return self->item_mngr_chldrn[mode];
+}
+
+
PhotosLoadState
photos_item_manager_get_load_state (PhotosItemManager *self)
{
diff --git a/src/photos-item-manager.h b/src/photos-item-manager.h
index e886c39..c1b4c5e 100644
--- a/src/photos-item-manager.h
+++ b/src/photos-item-manager.h
@@ -99,6 +99,9 @@ PhotosBaseItem *photos_item_manager_get_active_collection (Phot
GHashTable *photos_item_manager_get_collections (PhotosItemManager *self);
+PhotosBaseManager *photos_item_manager_get_for_mode (PhotosItemManager *self,
+ PhotosWindowMode mode);
+
PhotosLoadState photos_item_manager_get_load_state (PhotosItemManager *self);
void photos_item_manager_hide_item (PhotosItemManager *self,
PhotosBaseItem *item);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]