Ref. #584: There is no way to show the rating of an image
authorColin Clark <colin.clark@cclark.uk>
Thu, 1 Feb 2018 10:07:49 +0000 (10:07 +0000)
committerColin Clark <colin.clark@cclark.uk>
Thu, 1 Feb 2018 10:07:49 +0000 (10:07 +0000)
https://github.com/BestImageViewer/geeqie/issues/584

Additional tag %rating% for image overlay

doc/docbook/GuideOptionsWindow.xml
src/image-overlay.c

index 7ada147..9a0a384 100644 (file)
             <entry>imagecomment</entry>\r
             <entry>JPEG image comment</entry>\r
           </row>\r
+          <row>\r
+            <entry>rating</entry>\r
+            <entry>Image rating</entry>\r
+          </row>\r
           <row>\r
             <entry>&lt;meta_tag&gt;</entry>\r
             <entry>The Exif, XMP, or IPTC tag from metadata</entry>\r
index 4f8afe3..cb272f0 100644 (file)
@@ -340,6 +340,10 @@ static gchar *image_osd_mkinfo(const gchar *str, ImageWindow *imd, GHashTable *v
                        {
                        data = exif_get_image_comment(imd->image_fd);
                        }
+               else if (strcmp(name, "rating") == 0)
+                       {
+                       data = metadata_read_string(imd->image_fd, RATING_KEY, METADATA_PLAIN);
+                       }
 #ifdef HAVE_LUA
                else if (strncmp(name, "lua/", 4) == 0)
                        {