diff src/main.c @ 618:b1a922a32d9c

Save full OSD state to rc file and restore it on startup. It allows to restore OSD with or without histogram depending on previous state.
author zas_
date Sat, 10 May 2008 09:00:14 +0000
parents b2898f04c82e
children 734b6b0a3356
line wrap: on
line diff
--- a/src/main.c	Fri May 09 12:43:10 2008 +0000
+++ b/src/main.c	Sat May 10 09:00:14 2008 +0000
@@ -1208,7 +1208,8 @@
 			layout_geometry_get(NULL, &options->layout.main_window.x, &options->layout.main_window.y,
 					    &options->layout.main_window.w, &options->layout.main_window.h);
 			}
-		options->image_overlay.common.enabled = image_osd_get(lw->image, NULL);
+
+		image_osd_get(lw->image, &options->image_overlay.common.enabled);
 		}
 
 	layout_geometry_get_dividers(NULL, &options->layout.main_window.hdivider_pos, &options->layout.main_window.vdivider_pos);
@@ -1480,7 +1481,7 @@
 			}
 		}
 
-	image_osd_set(lw->image, (options->image_overlay.common.show_at_startup || options->image_overlay.common.enabled) ? OSD_SHOW_INFO : OSD_SHOW_NOTHING);
+	image_osd_set(lw->image, options->image_overlay.common.enabled | (options->image_overlay.common.show_at_startup ? OSD_SHOW_INFO : OSD_SHOW_NOTHING));
 
 	g_free(geometry);
 	g_free(cmd_path);