changeset 299:49eaa6463492

Do not display ... if not truncated.
author zas_
date Thu, 10 Apr 2008 11:31:20 +0000
parents cb93a982fcdd
children bda275cf9821
files src/image-overlay.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/image-overlay.c	Thu Apr 10 10:43:15 2008 +0000
+++ b/src/image-overlay.c	Thu Apr 10 11:31:20 2008 +0000
@@ -158,7 +158,7 @@
 				trunc = p;
 				break;
 				}
-			was_digit = (*p >= '0' && *p <= '9');
+			was_digit = g_ascii_isdigit(*p);
 			}
 
 		if (trunc) limit = atoi(trunc+1);
@@ -169,7 +169,7 @@
 		data = g_strdup(g_hash_table_lookup(vars, name));
 		if (!data && exif)
 			data = exif_get_data_as_text(exif, name);
-		if (data && *data && limit > 0)
+		if (data && *data && limit > 0 && strlen(data) > limit + 3)
 			{
 			gchar *new_data = g_strdup_printf("%-*.*s...", limit, limit, data);
 			g_free(data);