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



commit 2b4393702ff6061f9941d9621cbb5394c5c4e07c
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 7ef73771..1d4dc79f 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 = 60;
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]