From 4b77c4c1907566ca36e48b8fd8dad625bb7d16ab Mon Sep 17 00:00:00 2001
From: Avi Kelman <patcherton.fixesthings@gmail.com>
Date: Sat, 24 Aug 2013 16:21:11 -0400
Subject: [PATCH 3/3] 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.
---
src/filemanager/layout.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/src/filemanager/layout.c b/src/filemanager/layout.c
index da12ac9..8d4274b 100644
a
|
b
|
layout_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void * |
376 | 376 | { |
377 | 377 | if (panels_layout.horizontal_split != radio_widget->sel) |
378 | 378 | { |
| 379 | int eq; |
| 380 | |
379 | 381 | panels_layout.horizontal_split = radio_widget->sel; |
380 | 382 | |
381 | 383 | if (panels_layout.horizontal_split) |
382 | 384 | { |
383 | | if (panels_layout.horizontal_equal) |
| 385 | eq = panels_layout.horizontal_equal; |
| 386 | if (eq) |
384 | 387 | panels_layout.top_panel_size = height / 2; |
385 | 388 | } |
386 | 389 | else |
387 | 390 | { |
388 | | if (panels_layout.vertical_equal) |
| 391 | eq = panels_layout.vertical_equal; |
| 392 | if (eq) |
389 | 393 | panels_layout.left_panel_size = COLS / 2; |
390 | 394 | } |
| 395 | |
| 396 | widget_disable (WIDGET (bleft_widget), eq); |
| 397 | widget_disable (WIDGET (bright_widget), eq); |
| 398 | |
391 | 399 | layout_change (); |
392 | 400 | do_refresh (); |
393 | 401 | } |