diff src/fullscreen.c @ 318:b16b9b8979e5

Add a new struct ConfOptions to handle options. Changes were made among the code to use only one global var named "options" of type ConfOptions *. Initialization takes place in new init_options().
author zas_
date Fri, 11 Apr 2008 22:14:36 +0000
parents 6a7298988a7a
children d344bcf37618
line wrap: on
line diff
--- a/src/fullscreen.c	Fri Apr 11 20:35:37 2008 +0000
+++ b/src/fullscreen.c	Fri Apr 11 22:14:36 2008 +0000
@@ -194,7 +194,7 @@
 
 static gboolean fullscreen_saver_block_cb(gpointer data)
 {
-	if (fullscreen_disable_saver)
+	if (options->fullscreen_disable_saver)
 		{
 		fullscreen_saver_deactivate();
 		}
@@ -234,8 +234,8 @@
 	fs->stop_func = stop_func;
 	fs->stop_data = stop_data;
 
-	if (debug) printf("full screen requests screen %d\n", fullscreen_screen);
-	fullscreen_prefs_get_geometry(fullscreen_screen, window, &x, &y, &w, &h,
+	if (debug) printf("full screen requests screen %d\n", options->fullscreen_screen);
+	fullscreen_prefs_get_geometry(options->fullscreen_screen, window, &x, &y, &w, &h,
 				      &screen, &same);
 
 	fs->window = window_new(GTK_WINDOW_TOPLEVEL, "fullscreen", NULL, NULL, _("Full screen"));
@@ -243,14 +243,14 @@
 	/* this requests no decorations, if you still have them complain to the window manager author(s) */
 	gtk_window_set_decorated(GTK_WINDOW(fs->window), FALSE);
 
-	if (fullscreen_screen < 0)
+	if (options->fullscreen_screen < 0)
 		{
 		/* If we want control of the window size and position this is not what we want.
 		 * Geeqie needs control of which monitor(s) to use for full screen.
 		 */
 		gtk_window_fullscreen(GTK_WINDOW(fs->window));
 		}
-	else if (fullscreen_above)
+	else if (options->fullscreen_above)
 		{
 		/* request to be above other windows */
 		gtk_window_set_keep_above(GTK_WINDOW(fs->window), TRUE);
@@ -289,15 +289,15 @@
 
 	gtk_container_add(GTK_CONTAINER(fs->window), fs->imd->widget);
 
-	if (user_specified_window_background)
+	if (options->user_specified_window_background)
 		{
-		image_background_set_color(fs->imd, &window_background_color);
+		image_background_set_color(fs->imd, &options->window_background_color);
 		}
 
-	image_set_delay_flip(fs->imd, fullscreen_clean_flip);
+	image_set_delay_flip(fs->imd, options->fullscreen_clean_flip);
 	image_auto_refresh(fs->imd, fs->normal_imd->auto_refresh_interval);
 
-	if (fullscreen_clean_flip)
+	if (options->fullscreen_clean_flip)
 		{
 		image_set_update_func(fs->imd, fullscreen_image_update_cb, fs);
 		image_set_complete_func(fs->imd, fullscreen_image_complete_cb, fs);