changeset 1318:fb76c291b00f

fixed --fullscreen option together with enabled bar
author nadvornik
date Tue, 24 Feb 2009 20:47:38 +0000
parents cd7204a18f14
children 358685fb9dc9
files src/layout_util.c
diffstat 1 files changed, 9 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/src/layout_util.c	Tue Feb 24 20:34:39 2009 +0000
+++ b/src/layout_util.c	Tue Feb 24 20:47:38 2009 +0000
@@ -639,10 +639,10 @@
 static void layout_menu_float_cb(GtkToggleAction *action, gpointer data)
 {
 	LayoutWindow *lw = data;
-	
-	layout_exit_fullscreen(lw);
 
 	if (lw->options.tools_float == gtk_toggle_action_get_active(action)) return;
+
+	layout_exit_fullscreen(lw);
 	layout_tools_float_toggle(lw);
 }
 
@@ -658,19 +658,20 @@
 {
 	LayoutWindow *lw = data;
 
-	layout_exit_fullscreen(lw);
+	if (lw->options.toolbar_hidden == gtk_toggle_action_get_active(action)) return;
 
-	if (lw->options.toolbar_hidden == gtk_toggle_action_get_active(action)) return;
+	layout_exit_fullscreen(lw);
 	layout_toolbar_toggle(lw);
 }
 
+/* NOTE: these callbacks are called also from layout_util_sync_views */
 static void layout_menu_bar_cb(GtkToggleAction *action, gpointer data)
 {
 	LayoutWindow *lw = data;
 
-	layout_exit_fullscreen(lw);
+	if (layout_bar_enabled(lw) == gtk_toggle_action_get_active(action)) return;
 
-	if (layout_bar_enabled(lw) == gtk_toggle_action_get_active(action)) return;
+	layout_exit_fullscreen(lw);
 	layout_bar_toggle(lw);
 }
 
@@ -687,9 +688,9 @@
 {
 	LayoutWindow *lw = data;
 
-	layout_exit_fullscreen(lw);
+	if (lw->options.panels.sort.enabled == gtk_toggle_action_get_active(action)) return;
 
-	if (lw->options.panels.sort.enabled == gtk_toggle_action_get_active(action)) return;
+	layout_exit_fullscreen(lw);
 	layout_bar_sort_toggle(lw);
 }