[gnome-photos/wip/rishi/collection: 47/52] query, query-builder: Support OffsetController-less global queries



commit 967f3d7149b96cb89146496109a87dbbf0f2431b
Author: Debarshi Ray <debarshir gnome org>
Date:   Tue Feb 6 00:37:33 2018 +0100

    query, query-builder: Support OffsetController-less global queries
    
    https://gitlab.gnome.org/GNOME/gnome-photos/issues/29

 src/photos-query-builder.c | 2 +-
 src/photos-query.h         | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/photos-query-builder.c b/src/photos-query-builder.c
index 84effc69..983dbe5d 100644
--- a/src/photos-query-builder.c
+++ b/src/photos-query-builder.c
@@ -133,7 +133,7 @@ photos_query_builder_query (PhotosSearchContextState *state,
 
   where_sparql = photos_query_builder_where (state, global, flags);
 
-  if (global)
+  if (global && (flags & PHOTOS_QUERY_FLAGS_UNLIMITED) == 0)
     {
       gint offset = 0;
       gint step = 50;
diff --git a/src/photos-query.h b/src/photos-query.h
index 72decf3a..95b03cc5 100644
--- a/src/photos-query.h
+++ b/src/photos-query.h
@@ -69,7 +69,8 @@ typedef enum
   PHOTOS_QUERY_FLAGS_IMPORT         = 1 << 3,
   PHOTOS_QUERY_FLAGS_LOCAL          = 1 << 4,
   PHOTOS_QUERY_FLAGS_OVERVIEW       = 1 << 5,
-  PHOTOS_QUERY_FLAGS_SEARCH         = 1 << 6
+  PHOTOS_QUERY_FLAGS_SEARCH         = 1 << 6,
+  PHOTOS_QUERY_FLAGS_UNLIMITED      = 1 << 7
 } PhotosQueryFlags;
 
 extern const gchar *PHOTOS_QUERY_COLLECTIONS_IDENTIFIER;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]