-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path0003-Fix-en-dis-abling-of-layout-split-adjust-buttons.patch
48 lines (44 loc) · 1.73 KB
/
0003-Fix-en-dis-abling-of-layout-split-adjust-buttons.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
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/src/filemanager/layout.c
+++ b/src/filemanager/layout.c
@@ -376,18 +376,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);
+
layout_change ();
do_refresh ();
}
--
1.8.3.1