changeset 357:d3e509c0940e

Apply exif display config (Never/If set/Always) to pan view too.
author zas_
date Sun, 13 Apr 2008 20:33:45 +0000
parents 673d1eb5af73
children 384eed18df04
files src/pan-view.c
diffstat 1 files changed, 9 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/pan-view.c	Sun Apr 13 19:21:13 2008 +0000
+++ b/src/pan-view.c	Sun Apr 13 20:33:45 2008 +0000
@@ -1443,9 +1443,17 @@
 		gchar *label;
 		gchar *text;
 
-		label = g_strdup_printf("%s:", exif_get_description_by_key(ExifUIList[i].key));
+		if (ExifUIList[i].current == EXIF_UI_OFF) continue;
+		
 		text = exif_get_data_as_text(exif, ExifUIList[i].key);
 		text = bar_exif_validate_text(text);
+		if (ExifUIList[i].current == EXIF_UI_IFSET && (!text || !*text))
+			{
+			if (text) g_free(text);
+			continue;
+			}
+
+		label = g_strdup_printf("%s:", exif_get_description_by_key(ExifUIList[i].key));
 		pan_text_alignment_add(ta, label, text);
 		g_free(label);
 		g_free(text);