changeset 155:d06bccc7551e

show active marks in image overlay
author nadvornik
date Fri, 14 Dec 2007 21:51:46 +0000
parents 6bcd037bf176
children dd6dc0a55d3d
files src/image-overlay.c
diffstat 1 files changed, 10 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/src/image-overlay.c	Sun Dec 09 21:20:27 2007 +0000
+++ b/src/image-overlay.c	Fri Dec 14 21:51:46 2007 +0000
@@ -187,21 +187,21 @@
 	g_free(name_escaped);
 
 	{
-        
-        GString *buf = g_string_sized_new(FILEDATA_MARKS_SIZE * 2);
+		GString *buf = g_string_sized_new(FILEDATA_MARKS_SIZE * 2);
+		FileData *fd = image_get_fd(imd);
         
-        for (i=0; i < FILEDATA_MARKS_SIZE; i++) {
-            
-            g_string_append_printf(buf, " %c", 'a'+i);
-        }
-        text2 = g_strdup_printf("%s\n%s", text, buf->str);
-        
-    }
+		for (i=0; i < FILEDATA_MARKS_SIZE; i++) 
+			{
+			
+			g_string_append_printf(buf, fd->marks[i] ? " <span background='#FF00FF'>%c</span>" : " %c", '1' + i);
+    			}
+    		text2 = g_strdup_printf("%s\n%s", text, buf->str);
+	}
         
 	layout = gtk_widget_create_pango_layout(imd->pr, NULL);
 	pango_layout_set_markup(layout, text2, -1);
 	g_free(text2);
-    g_free(text);
+	g_free(text);
     
 	pango_layout_get_pixel_size(layout, &width, &height);