Ticket #3061: 0003-Fix-en-dis-abling-of-layout-split-adjust-buttons.patch

File 0003-Fix-en-dis-abling-of-layout-split-adjust-buttons.patch, 1.7 KB (added by fiendish, 11 years ago)
  • src/filemanager/layout.c

    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 * 
    376376        { 
    377377            if (panels_layout.horizontal_split != radio_widget->sel) 
    378378            { 
     379                int eq; 
     380 
    379381                panels_layout.horizontal_split = radio_widget->sel; 
    380382 
    381383                if (panels_layout.horizontal_split) 
    382384                { 
    383                     if (panels_layout.horizontal_equal) 
     385                    eq = panels_layout.horizontal_equal; 
     386                    if (eq) 
    384387                        panels_layout.top_panel_size = height / 2; 
    385388                } 
    386389                else 
    387390                { 
    388                     if (panels_layout.vertical_equal) 
     391                    eq = panels_layout.vertical_equal; 
     392                    if (eq) 
    389393                        panels_layout.left_panel_size = COLS / 2; 
    390394                } 
     395 
     396                widget_disable (WIDGET (bleft_widget), eq); 
     397                widget_disable (WIDGET (bright_widget), eq); 
     398 
    391399                layout_change (); 
    392400                do_refresh (); 
    393401            }