mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-23 04:46:55 +03:00
Merge branch '1991_toggle_panels_view'
* 1991_toggle_panels_view: Ticket #1991: toggle panels view
This commit is contained in:
commit
40164d039e
@ -229,6 +229,7 @@ CmdSwapPanel = ctrl-u
|
||||
CmdHistory = alt-h
|
||||
CmdToggleListing = alt-t
|
||||
CmdToggleShowHidden = alt-dot
|
||||
CmdTogglePanelsSplit = alt-comma
|
||||
ShowCommandLine = ctrl-o
|
||||
CmdCopyCurrentPathname = alt-a
|
||||
CmdCopyOtherPathname = alt-shift-a
|
||||
|
@ -233,6 +233,7 @@ CmdSwapPanel = ctrl-u
|
||||
CmdHistory = alt-h
|
||||
CmdToggleListing = alt-t
|
||||
CmdToggleShowHidden = alt-dot
|
||||
CmdTogglePanelsSplit = alt-comma
|
||||
ShowCommandLine = ctrl-o
|
||||
CmdCopyCurrentPathname = alt-a
|
||||
CmdCopyOtherPathname = alt-shift-a
|
||||
|
@ -366,6 +366,7 @@
|
||||
#define CK_ViewFileCmd 7071
|
||||
#define CK_HelpCmd 7072
|
||||
#define CK_MenuCmd 7073
|
||||
#define CK_TogglePanelsSplit 7074
|
||||
|
||||
/* panels */
|
||||
#define CK_PanelChdirOtherPanel 8001
|
||||
|
@ -366,6 +366,7 @@ static name_keymap_t command_names[] = {
|
||||
{ "CmdCopyCurrentTagged", CK_CopyCurrentTagged },
|
||||
{ "CmdCopyOtherTagged", CK_CopyOtherTagged },
|
||||
{ "CmdToggleShowHidden", CK_ToggleShowHidden },
|
||||
{ "CmdTogglePanelsSplit", CK_TogglePanelsSplit },
|
||||
|
||||
/* panel */
|
||||
{ "PanelChdirOtherPanel", CK_PanelChdirOtherPanel },
|
||||
@ -830,6 +831,7 @@ const global_keymap_t default_main_map[] = {
|
||||
/* View output */
|
||||
{ XCTRL ('o'), CK_ShowCommandLine, "C-o" },
|
||||
{ ALT ('.'), CK_ToggleShowHidden, "M-." },
|
||||
{ ALT (','), CK_TogglePanelsSplit, "M-," },
|
||||
{ XCTRL ('x'), CK_StartExtMap1, "C-x" },
|
||||
/* Select/unselect group */
|
||||
{ KEY_KP_ADD, CK_SelectCmd, "+" },
|
||||
|
@ -509,7 +509,7 @@ init_layout (void)
|
||||
radio_widget->sel = horizontal_split;
|
||||
}
|
||||
|
||||
static void
|
||||
void
|
||||
layout_change (void)
|
||||
{
|
||||
setup_panels ();
|
||||
|
@ -9,6 +9,7 @@
|
||||
#include "panel.h"
|
||||
#include "widget.h"
|
||||
|
||||
void layout_change (void);
|
||||
void layout_cmd (void);
|
||||
void setup_panels (void);
|
||||
void destroy_panels (void);
|
||||
|
11
src/main.c
11
src/main.c
@ -903,6 +903,14 @@ toggle_show_hidden (void)
|
||||
update_panels (UP_RELOAD, UP_KEEPSEL);
|
||||
}
|
||||
|
||||
static void
|
||||
toggle_panels_split (void)
|
||||
{
|
||||
horizontal_split = !horizontal_split;
|
||||
layout_change ();
|
||||
do_refresh();
|
||||
}
|
||||
|
||||
void
|
||||
toggle_kilobyte_si (void)
|
||||
{
|
||||
@ -1348,6 +1356,9 @@ midnight_execute_cmd (Widget *sender, unsigned long command)
|
||||
case CK_ToggleShowHidden:
|
||||
toggle_show_hidden ();
|
||||
break;
|
||||
case CK_TogglePanelsSplit:
|
||||
toggle_panels_split ();
|
||||
break;
|
||||
case CK_TreeCmd:
|
||||
tree_cmd ();
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user