[gnome-photos/wip/rishi/view-model: 2/2] 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: 2/2] item-manager: Add photos_item_manager_get_for_mode
- Date: Tue, 23 Aug 2016 08:28:10 +0000 (UTC)
commit f9827d2407f5cdac3bdb030559266db4dafaa2a7
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 aa2a503..f9282e1 100644
--- a/src/photos-item-manager.c
+++ b/src/photos-item-manager.c
@@ -823,6 +823,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]