From 3452b707b8f259069fdda00cc535447aed44ba70 Mon Sep 17 00:00:00 2001 From: Avi Kelman Date: Sat, 24 Aug 2013 16:21:11 -0400 Subject: [PATCH] Ticket #3061: fix [en|dis]abling of layout split adjust buttons. Switching between vertical and horizontal layouts doesn't properly activate or deactivate the < and > widget buttons in the layout dialog according to the setting of the mode being switched to. Signed-off-by: Andrew Borodin --- src/filemanager/layout.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/filemanager/layout.c b/src/filemanager/layout.c index 06c660e53..fcf24ad65 100644 --- a/src/filemanager/layout.c +++ b/src/filemanager/layout.c @@ -377,19 +377,26 @@ layout_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void * { if (panels_layout.horizontal_split != radio_widget->sel) { + int eq; + panels_layout.horizontal_split = radio_widget->sel; if (panels_layout.horizontal_split) { - if (panels_layout.horizontal_equal) + eq = panels_layout.horizontal_equal; + if (eq) panels_layout.top_panel_size = height / 2; } else { - if (panels_layout.vertical_equal) + eq = panels_layout.vertical_equal; + if (eq) panels_layout.left_panel_size = COLS / 2; } + widget_disable (WIDGET (bleft_widget), eq); + widget_disable (WIDGET (bright_widget), eq); + update_split (h); layout_change (); do_refresh ();