[gnome-photos/wip/rishi/style-fixes] query-builder, sparql-template: Style fixes




commit 2289a13a5f59c93399671af5e83347196d6aa3fc
Author: Debarshi Ray <debarshir gnome org>
Date:   Tue Mar 9 20:02:12 2021 +0100

    query-builder, sparql-template: Style fixes
    
    https://gitlab.gnome.org/GNOME/gnome-photos/-/merge_requests/173

 src/photos-query-builder.c   | 15 ++++++++++-----
 src/photos-sparql-template.h |  4 +++-
 2 files changed, 13 insertions(+), 6 deletions(-)
---
diff --git a/src/photos-query-builder.c b/src/photos-query-builder.c
index ff30ee1d..95ea1055 100644
--- a/src/photos-query-builder.c
+++ b/src/photos-query-builder.c
@@ -35,7 +35,8 @@
 #include "photos-search-type-manager.h"
 
 
-static const gchar *BLOCKED_MIME_TYPES_FILTER = "(nie:mimeType(?urn) != 'image/gif' && nie:mimeType(?urn) != 
'image/x-eps')";
+static const gchar *BLOCKED_MIME_TYPES_FILTER = "(nie:mimeType(?urn) != 'image/gif' "
+                                                "&& nie:mimeType(?urn) != 'image/x-eps')";
 
 static const gchar *COLLECTIONS_FILTER
   = "(fn:starts-with (nao:identifier (?urn), '" PHOTOS_QUERY_COLLECTIONS_IDENTIFIER "')"
@@ -74,9 +75,9 @@ photos_query_builder_query (PhotosSearchContextState *state,
       "nmm:flash (?urn) "
       "slo:location (?urn) ";
   g_autofree gchar *item_mngr_where = NULL;
-  g_autofree gchar *srch_mtch_mngr_filter = NULL;
-  g_autofree gchar *src_mngr_filter = NULL;
   g_autofree gchar *offset_limit = NULL;
+  g_autofree gchar *src_mngr_filter = NULL;
+  g_autofree gchar *srch_mtch_mngr_filter = NULL;
   gchar *sparql;
 
   sparql_template = photos_base_manager_get_sparql_template (state->srch_typ_mngr, flags);
@@ -116,7 +117,9 @@ photos_query_builder_query (PhotosSearchContextState *state,
                                          "order", "ORDER BY DESC (?mtime)",
                                          "offset_limit", offset_limit ? offset_limit : "",
                                          "projection", projection,
-                                         "search_match_filter", srch_mtch_mngr_filter == NULL ? "(true)" : 
srch_mtch_mngr_filter,
+                                         "search_match_filter", srch_mtch_mngr_filter == NULL
+                                                                ? "(true)"
+                                                                : srch_mtch_mngr_filter,
                                          "source_filter", src_mngr_filter == NULL ? "(true)" : 
src_mngr_filter,
                                          NULL);
 
@@ -202,7 +205,9 @@ photos_query_builder_count_query (PhotosSearchContextState *state, gint flags)
                                          "order", "",
                                          "offset_limit", "",
                                          "projection", "COUNT(?urn)",
-                                         "search_match_filter", srch_mtch_mngr_filter == NULL ? "(true)" : 
srch_mtch_mngr_filter,
+                                         "search_match_filter", srch_mtch_mngr_filter == NULL
+                                                                ? "(true)"
+                                                                : srch_mtch_mngr_filter,
                                          "source_filter", src_mngr_filter == NULL ? "(true)" : 
src_mngr_filter,
                                          NULL);
 
diff --git a/src/photos-sparql-template.h b/src/photos-sparql-template.h
index 8ad46983..f75bd2c8 100644
--- a/src/photos-sparql-template.h
+++ b/src/photos-sparql-template.h
@@ -27,6 +27,8 @@ G_DECLARE_FINAL_TYPE (PhotosSparqlTemplate, photos_sparql_template, PHOTOS, SPAR
 
 PhotosSparqlTemplate *photos_sparql_template_new (const gchar *template_path);
 
-gchar *photos_sparql_template_get_sparql (PhotosSparqlTemplate *self, const gchar *first_binding_name, ...) 
G_GNUC_NULL_TERMINATED;
+gchar *photos_sparql_template_get_sparql (PhotosSparqlTemplate *self,
+                                          const gchar *first_binding_name,
+                                          ...) G_GNUC_NULL_TERMINATED;
 
 G_END_DECLS


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