changeset 2720:12ba4999838f

Ref. #584: There is no way to show the rating of an image https://github.com/BestImageViewer/geeqie/issues/584 Additional tag %rating% for image overlay
author Colin Clark <colin.clark@cclark.uk>
date Thu, 01 Feb 2018 10:07:49 +0000
parents 13e542066941
children bd779e9f82fc
files doc/docbook/GuideOptionsWindow.xml src/image-overlay.c
diffstat 2 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/doc/docbook/GuideOptionsWindow.xml	Wed Jan 24 22:40:02 2018 +0100
+++ b/doc/docbook/GuideOptionsWindow.xml	Thu Feb 01 10:07:49 2018 +0000
@@ -197,6 +197,10 @@
             <entry>JPEG image comment</entry>
           </row>
           <row>
+            <entry>rating</entry>
+            <entry>Image rating</entry>
+          </row>
+          <row>
             <entry>&lt;meta_tag&gt;</entry>
             <entry>The Exif, XMP, or IPTC tag from metadata</entry>
           </row>
--- a/src/image-overlay.c	Wed Jan 24 22:40:02 2018 +0100
+++ b/src/image-overlay.c	Thu Feb 01 10:07:49 2018 +0000
@@ -340,6 +340,10 @@
 			{
 			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)
 			{