diff src/image-overlay.c @ 822:df541dc41707

Allow to set image overlay info position through options: - image_overlay.common.x - image_overlay.common.y For now, there are only editable through rc file.
author zas_
date Thu, 12 Jun 2008 20:33:51 +0000
parents fb249b8e63e4
children efed9a1520d6
line wrap: on
line diff
--- a/src/image-overlay.c	Thu Jun 12 20:17:22 2008 +0000
+++ b/src/image-overlay.c	Thu Jun 12 20:33:51 2008 +0000
@@ -42,6 +42,9 @@
 	OsdShowFlags show;
 
 	gint ovl_info;
+	
+	gint x;
+	gint y;
 
 	gint icon_time[IMAGE_OSD_COUNT];
 	gint icon_id[IMAGE_OSD_COUNT];
@@ -73,9 +76,6 @@
 
 #define OSD_DATA "overlay-data"
 
-#define OSD_INFO_X 10
-#define OSD_INFO_Y -10
-
 #define IMAGE_OSD_DEFAULT_DURATION 30
 
 #define HISTOGRAM_HEIGHT 140
@@ -761,11 +761,11 @@
 				if (osd->ovl_info == 0)
 					{
 					osd->ovl_info = image_overlay_add(osd->imd, pixbuf,
-									  OSD_INFO_X, OSD_INFO_Y, TRUE, FALSE);
+									  osd->x, osd->y, TRUE, FALSE);
 					}
 				else
 					{
-					image_overlay_set(osd->imd, osd->ovl_info, pixbuf, OSD_INFO_X, OSD_INFO_Y);
+					image_overlay_set(osd->imd, osd->ovl_info, pixbuf, osd->x, osd->y);
 					}
 				g_object_unref(pixbuf);
 				}
@@ -970,7 +970,9 @@
 		osd->timer_id = -1;
 		osd->show = OSD_SHOW_NOTHING;
 		osd->histogram = NULL;
-
+		osd->x = options->image_overlay.common.x;
+		osd->y = options->image_overlay.common.y;
+		
 		osd->destroy_id = g_signal_connect(G_OBJECT(imd->pr), "destroy",
 						   G_CALLBACK(image_osd_destroy_cb), osd);
 		image_set_osd_data(imd, osd);