[gnome-photos] base-item: Add the "mirror" orientations to the sanity check



commit a35889b18796dad27e8986a05a8fb6e7e6e13c88
Author: Debarshi Ray <debarshir gnome org>
Date:   Sat Nov 25 10:48:33 2017 +0100

    base-item: Add the "mirror" orientations to the sanity check
    
    ... and print a warning for unknown nfo:orientation values.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=789196

 src/photos-base-item.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/src/photos-base-item.c b/src/photos-base-item.c
index cbac086..1683d41 100644
--- a/src/photos-base-item.c
+++ b/src/photos-base-item.c
@@ -2798,10 +2798,16 @@ photos_base_item_populate_from_cursor (PhotosBaseItem *self, TrackerSparqlCursor
   orientation = tracker_sparql_cursor_get_string (cursor, PHOTOS_QUERY_COLUMNS_ORIENTATION, NULL);
   priv->orientation = g_quark_from_string (orientation);
   if (priv->orientation != PHOTOS_ORIENTATION_BOTTOM
+      && priv->orientation != PHOTOS_ORIENTATION_BOTTOM_MIRROR
       && priv->orientation != PHOTOS_ORIENTATION_LEFT
+      && priv->orientation != PHOTOS_ORIENTATION_LEFT_MIRROR
       && priv->orientation != PHOTOS_ORIENTATION_RIGHT
-      && priv->orientation != PHOTOS_ORIENTATION_TOP)
+      && priv->orientation != PHOTOS_ORIENTATION_RIGHT_MIRROR
+      && priv->orientation != PHOTOS_ORIENTATION_TOP
+      && priv->orientation != PHOTOS_ORIENTATION_TOP_MIRROR)
     {
+      if (orientation != NULL)
+        g_warning ("Unknown value for nfo:orientation: %s", orientation);
       priv->orientation = PHOTOS_ORIENTATION_TOP;
     }
 


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