[gnome-photos] query-builder: Default to [0, 50) if no OffsetController is specified
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos] query-builder: Default to [0, 50) if no OffsetController is specified
- Date: Thu, 20 Feb 2014 10:03:14 +0000 (UTC)
commit 15a6a57f018472e8ca74ad9fd709ad87b73da689
Author: Debarshi Ray <debarshir gnome org>
Date: Sat Feb 8 14:37:09 2014 +0100
query-builder: Default to [0, 50) if no OffsetController is specified
src/photos-query-builder.c | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
---
diff --git a/src/photos-query-builder.c b/src/photos-query-builder.c
index 9f3a935..e617bfd 100644
--- a/src/photos-query-builder.c
+++ b/src/photos-query-builder.c
@@ -155,11 +155,15 @@ photos_query_builder_query (gboolean global, gint flags, PhotosOffsetController
if (global)
{
- gint offset;
- gint step;
+ gint offset = 0;
+ gint step = 50;
+
+ if (offset_cntrlr != NULL)
+ {
+ offset = photos_offset_controller_get_offset (offset_cntrlr);
+ step = photos_offset_controller_get_step (offset_cntrlr);
+ }
- offset = photos_offset_controller_get_offset (offset_cntrlr);
- step = photos_offset_controller_get_step (offset_cntrlr);
tail_sparql = g_strdup_printf ("ORDER BY DESC (?mtime) LIMIT %d OFFSET %d", step, offset);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]