Ticket #2465: 0001-Ticket-2465-dynamically-resize-panels.patch

File 0001-Ticket-2465-dynamically-resize-panels.patch, 3.2 KB (added by angel_il, 14 years ago)

first commit

  • lib/keybind.c

    From f589bbc67ca5de28fc2b85179c26ba50ee3e4442 Mon Sep 17 00:00:00 2001
    From: Ilia Maslakov <il.smind@gmail.com>
    Date: Fri, 18 Mar 2011 13:12:11 +0000
    Subject: [PATCH 1/2] Ticket #2465 (dynamically resize panels)
    
        added two actions to dynamically resize panels (PanelEnlangeRight, PanelEnlangeLeft)
    
    Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
    ---
     lib/keybind.c              |    2 ++
     lib/keybind.h              |    2 ++
     src/filemanager/layout.c   |   18 ++++++++++++++++++
     src/filemanager/layout.h   |    2 ++
     src/filemanager/midnight.c |    6 ++++++
     5 files changed, 30 insertions(+), 0 deletions(-)
    
    diff --git a/lib/keybind.c b/lib/keybind.c
    index a4f4093..c2b412a 100644
    a b static name_keymap_t command_names[] = { 
    437437    {"PanelSortOrderBySize", CK_PanelSortOrderBySize}, 
    438438    {"PanelSortOrderByMTime", CK_PanelSortOrderByMTime}, 
    439439    {"PanelSmartGotoParentDir", CK_PanelSmartGotoParentDir}, 
     440    {"PanelEnlangeLeft", CK_EnlargeLeftPanel}, 
     441    {"PanelEnlangeRight", CK_EnlargeRightPanel}, 
    440442 
    441443    /* input line */ 
    442444    {"InputBol", CK_InputBol}, 
  • lib/keybind.h

    diff --git a/lib/keybind.h b/lib/keybind.h
    index 7a7f1b8..7d725d2 100644
    a b  
    415415#define CK_DialogNextCmd                7080 
    416416#define CK_DialogPrevCmd                7081 
    417417#define CK_EditForceInternalCmd         7082 
     418#define CK_EnlargeLeftPanel             7083 
     419#define CK_EnlargeRightPanel            7084 
    418420 
    419421/* panels */ 
    420422#define CK_PanelChdirOtherPanel         8001 
  • src/filemanager/layout.c

    diff --git a/src/filemanager/layout.c b/src/filemanager/layout.c
    index c84f139..4ec55ab 100644
    a b mc_refresh (void) 
    736736/* --------------------------------------------------------------------------------------------- */ 
    737737 
    738738void 
     739layout_enlarge_left_panel (void) 
     740{ 
     741    first_panel_size++; 
     742    layout_change (); 
     743} 
     744 
     745/* --------------------------------------------------------------------------------------------- */ 
     746 
     747void 
     748layout_enlarge_right_panel (void) 
     749{ 
     750    first_panel_size--; 
     751    layout_change (); 
     752} 
     753 
     754/* --------------------------------------------------------------------------------------------- */ 
     755 
     756void 
    739757setup_panels (void) 
    740758{ 
    741759    int start_y; 
  • src/filemanager/layout.h

    diff --git a/src/filemanager/layout.h b/src/filemanager/layout.h
    index ad250e5..6e71d8a 100644
    a b extern int nice_rotating_dash; 
    3535 
    3636/*** declarations of public functions ************************************************************/ 
    3737 
     38void layout_enlarge_left_panel (void); 
     39void layout_enlarge_right_panel (void); 
    3840void layout_change (void); 
    3941void layout_box (void); 
    4042void setup_panels (void); 
  • src/filemanager/midnight.c

    diff --git a/src/filemanager/midnight.c b/src/filemanager/midnight.c
    index f99774c..c1a4541 100644
    a b midnight_execute_cmd (Widget * sender, unsigned long command) 
    11511151        jobs_cmd (); 
    11521152        break; 
    11531153#endif 
     1154    case CK_EnlargeLeftPanel: 
     1155        layout_enlarge_left_panel (); 
     1156        break; 
     1157    case CK_EnlargeRightPanel: 
     1158        layout_enlarge_right_panel (); 
     1159        break; 
    11541160    case CK_LayoutBox: 
    11551161        layout_box (); 
    11561162        break;