[gnome-photos/wip/rishi/collection: 14/19] query, source-manager: Support specifically querying for local content
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos/wip/rishi/collection: 14/19] query, source-manager: Support specifically querying for local content
- Date: Mon, 5 Feb 2018 23:49:05 +0000 (UTC)
commit b97fc57a00cda312586b2d364d026d9e394a72be
Author: Debarshi Ray <debarshir gnome org>
Date: Tue Feb 6 00:36:01 2018 +0100
query, source-manager: Support specifically querying for local content
https://gitlab.gnome.org/GNOME/gnome-photos/issues/29
src/photos-query.h | 5 +++--
src/photos-source-manager.c | 4 ++++
2 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/src/photos-query.h b/src/photos-query.h
index e59c03df..72decf3a 100644
--- a/src/photos-query.h
+++ b/src/photos-query.h
@@ -67,8 +67,9 @@ typedef enum
PHOTOS_QUERY_FLAGS_COLLECTIONS = 1 << 1,
PHOTOS_QUERY_FLAGS_FAVORITES = 1 << 2,
PHOTOS_QUERY_FLAGS_IMPORT = 1 << 3,
- PHOTOS_QUERY_FLAGS_OVERVIEW = 1 << 4,
- PHOTOS_QUERY_FLAGS_SEARCH = 1 << 5
+ PHOTOS_QUERY_FLAGS_LOCAL = 1 << 4,
+ PHOTOS_QUERY_FLAGS_OVERVIEW = 1 << 5,
+ PHOTOS_QUERY_FLAGS_SEARCH = 1 << 6
} PhotosQueryFlags;
extern const gchar *PHOTOS_QUERY_COLLECTIONS_IDENTIFIER;
diff --git a/src/photos-source-manager.c b/src/photos-source-manager.c
index e645ae17..322fd777 100644
--- a/src/photos-source-manager.c
+++ b/src/photos-source-manager.c
@@ -103,6 +103,10 @@ photos_source_manager_get_filter (PhotosBaseManager *mngr, gint flags)
if (mount == NULL)
source = NULL;
}
+ else if (flags & PHOTOS_QUERY_FLAGS_LOCAL)
+ {
+ source = photos_base_manager_get_object_by_id (mngr, PHOTOS_SOURCE_STOCK_LOCAL);
+ }
else if (flags & PHOTOS_QUERY_FLAGS_SEARCH)
{
source = photos_base_manager_get_active_object (mngr);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]