Added missed shortcuts for ButtonBar commands.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
Andrew Borodin 2009-11-06 14:55:21 +03:00
parent da33e767e9
commit 6b71dc9f12
5 changed files with 22 additions and 13 deletions

View File

@ -189,6 +189,7 @@ ViewMoveUp = k; y; up
ViewMoveDown = j; delete; down ViewMoveDown = j; delete; down
[main] [main]
CmdHelp = f1
CmdUserMenu = f2 CmdUserMenu = f2
CmdView = f3 CmdView = f3
CmdViewFile = f13 CmdViewFile = f13
@ -197,6 +198,7 @@ CmdCopy = f5
CmdRename = f6 CmdRename = f6
CmdMkdir = f7 CmdMkdir = f7
CmdDelete = f8 CmdDelete = f8
CmdMenu = f9
CmdQuit = f10 CmdQuit = f10
CmdMenuLastSelected = f19 CmdMenuLastSelected = f19
CmdQuietQuit = f20 CmdQuietQuit = f20
@ -293,7 +295,6 @@ InputMoveRight = right; alt-right
InputWordRight = ctrl-right InputWordRight = ctrl-right
InputForwardChar = ctrl-f InputForwardChar = ctrl-f
InputForwardWord = alt-f InputForwardWord = alt-f
InputBackwardDelete = backspace InputBackwardDelete = backspace
InputDeleteChar = delete InputDeleteChar = delete
InputKillWord = alt-d InputKillWord = alt-d

View File

@ -193,6 +193,7 @@ ViewMoveUp = k; y; up
ViewMoveDown = j; delete; down ViewMoveDown = j; delete; down
[main] [main]
CmdHelp = f1
CmdUserMenu = f2 CmdUserMenu = f2
CmdView = f3 CmdView = f3
CmdViewFile = f13 CmdViewFile = f13
@ -201,6 +202,7 @@ CmdCopy = f5
CmdRename = f6 CmdRename = f6
CmdMkdir = f7 CmdMkdir = f7
CmdDelete = f8 CmdDelete = f8
CmdMenu = f9
CmdQuit = f10 CmdQuit = f10
CmdMenuLastSelected = f19 CmdMenuLastSelected = f19
CmdQuietQuit = f20 CmdQuietQuit = f20
@ -297,7 +299,6 @@ InputMoveRight = right; alt-right
InputWordRight = ctrl-right InputWordRight = ctrl-right
InputForwardChar = ctrl-f InputForwardChar = ctrl-f
InputForwardWord = alt-f InputForwardWord = alt-f
InputBackwardDelete = backspace InputBackwardDelete = backspace
InputDeleteChar = delete InputDeleteChar = delete
InputKillWord = alt-d InputKillWord = alt-d

View File

@ -51,6 +51,7 @@
#define CK_Load_Next_File 112 #define CK_Load_Next_File 112
#define CK_Load_Syntax_File 121 #define CK_Load_Syntax_File 121
#define CK_Load_Menu_File 122 #define CK_Load_Menu_File 122
#define CK_Menu 123
/* block commands */ /* block commands */
#define CK_Mark 201 #define CK_Mark 201
@ -121,7 +122,6 @@
#define CK_Save_Desktop 451 #define CK_Save_Desktop 451
#define CK_New_Window 452 #define CK_New_Window 452
#define CK_Cycle 453 #define CK_Cycle 453
#define CK_Menu 454
#define CK_Save_And_Quit 455 #define CK_Save_And_Quit 455
#define CK_Run_Another 456 #define CK_Run_Another 456
#define CK_Check_Save_And_Quit 457 #define CK_Check_Save_And_Quit 457
@ -344,6 +344,8 @@
#define CK_UserMenuCmd 7069 #define CK_UserMenuCmd 7069
#define CK_ViewCmd 7070 #define CK_ViewCmd 7070
#define CK_ViewFileCmd 7071 #define CK_ViewFileCmd 7071
#define CK_HelpCmd 7072
#define CK_MenuCmd 7073
/* panels */ /* panels */
#define CK_PanelChdirOtherPanel 8001 #define CK_PanelChdirOtherPanel 8001

View File

@ -75,6 +75,7 @@ static name_keymap_t command_names[] = {
{ "EditDeleteWordRight", CK_Delete_Word_Right }, { "EditDeleteWordRight", CK_Delete_Word_Right },
{ "EditParagraphUp", CK_Paragraph_Up }, { "EditParagraphUp", CK_Paragraph_Up },
{ "EditParagraphDown", CK_Paragraph_Down }, { "EditParagraphDown", CK_Paragraph_Down },
{ "EditMenu", CK_Menu },
{ "EditSave", CK_Save }, { "EditSave", CK_Save },
{ "EditLoad", CK_Load }, { "EditLoad", CK_Load },
{ "EditNew", CK_New }, { "EditNew", CK_New },
@ -210,7 +211,6 @@ static name_keymap_t command_names[] = {
{ "EditSaveDesktop", CK_Save_Desktop }, { "EditSaveDesktop", CK_Save_Desktop },
{ "EditNewWindow", CK_New_Window }, { "EditNewWindow", CK_New_Window },
{ "EditCycle", CK_Cycle }, { "EditCycle", CK_Cycle },
{ "EditMenu", CK_Menu },
{ "EditSaveAndQuit", CK_Save_And_Quit }, { "EditSaveAndQuit", CK_Save_And_Quit },
{ "EditRunAnother", CK_Run_Another }, { "EditRunAnother", CK_Run_Another },
{ "EditCheckSaveAndQuit", CK_Check_Save_And_Quit }, { "EditCheckSaveAndQuit", CK_Check_Save_And_Quit },
@ -261,6 +261,8 @@ static name_keymap_t command_names[] = {
{ "TreeRemove", CK_TreeRemove }, { "TreeRemove", CK_TreeRemove },
/* main commands */ /* main commands */
{ "CmdHelp", CK_HelpCmd },
{ "CmdMenu", CK_MenuCmd },
{ "CmdChmod", CK_ChmodCmd }, { "CmdChmod", CK_ChmodCmd },
{ "CmdMenuLastSelected", CK_MenuLastSelectedCmd }, { "CmdMenuLastSelected", CK_MenuLastSelectedCmd },
{ "CmdSingleDirsize", CK_SingleDirsizeCmd }, { "CmdSingleDirsize", CK_SingleDirsizeCmd },
@ -565,6 +567,7 @@ const global_keymap_t default_editor_keymap[] = {
{ KEY_F (6), CK_Move, "F6" }, { KEY_F (6), CK_Move, "F6" },
{ KEY_F (7), CK_Find, "F7" }, { KEY_F (7), CK_Find, "F7" },
{ KEY_F (8), CK_Remove, "F8" }, { KEY_F (8), CK_Remove, "F8" },
{ KEY_F (9), CK_Menu, "F9" },
{ KEY_F (10), CK_Quit, "F10" }, { KEY_F (10), CK_Quit, "F10" },
/* edit user menu */ /* edit user menu */
{ KEY_F (11), CK_User_Menu, "S-F1" }, { KEY_F (11), CK_User_Menu, "S-F1" },
@ -713,6 +716,7 @@ const global_keymap_t default_panel_keymap[] = {
/* main.c */ /* main.c */
const global_keymap_t default_main_map[] = { const global_keymap_t default_main_map[] = {
{ KEY_F (1), CK_HelpCmd, "F1" },
{ KEY_F (2), CK_UserMenuCmd, "F2" }, { KEY_F (2), CK_UserMenuCmd, "F2" },
{ KEY_F (3), CK_ViewCmd, "F3" }, { KEY_F (3), CK_ViewCmd, "F3" },
{ KEY_F (4), CK_EditCmd, "F4" }, { KEY_F (4), CK_EditCmd, "F4" },
@ -720,6 +724,7 @@ const global_keymap_t default_main_map[] = {
{ KEY_F (6), CK_RenameCmd, "F6" }, { KEY_F (6), CK_RenameCmd, "F6" },
{ KEY_F (7), CK_MkdirCmd, "F7" }, { KEY_F (7), CK_MkdirCmd, "F7" },
{ KEY_F (8), CK_DeleteCmd, "F6" }, { KEY_F (8), CK_DeleteCmd, "F6" },
{ KEY_F (9), CK_MenuCmd, "F9" },
{ KEY_F (10), CK_QuitCmd, "F10" }, { KEY_F (10), CK_QuitCmd, "F10" },
{ KEY_F (13), CK_ViewFileCmd, "S-F3" }, { KEY_F (13), CK_ViewFileCmd, "S-F3" },
{ KEY_F (19), CK_MenuLastSelectedCmd, "S-F9" }, { KEY_F (19), CK_MenuLastSelectedCmd, "S-F9" },

View File

@ -1226,6 +1226,9 @@ midnight_execute_cmd (Widget *sender, Widget *receiver,
ftplink_cmd (); ftplink_cmd ();
break; break;
#endif #endif
case CK_HelpCmd:
help_cmd ();
break;
case CK_HistoryCmd: case CK_HistoryCmd:
history_cmd (); history_cmd ();
break; break;
@ -1254,6 +1257,9 @@ midnight_execute_cmd (Widget *sender, Widget *receiver,
listmode_cmd (); listmode_cmd ();
break; break;
#endif #endif
case CK_MenuCmd:
menu_cmd ();
break;
case CK_MenuInfoCmd: case CK_MenuInfoCmd:
info_cmd (); info_cmd ();
break; break;
@ -1579,11 +1585,10 @@ midnight_callback (struct Dlg_head *h, dlg_msg_t msg, int parm)
switch (msg) { switch (msg) {
case DLG_IDLE: case DLG_IDLE:
/* We only need the first idle event */ /* We only need the first idle event to show user menu after start */
set_idle_proc (h, 0); set_idle_proc (h, 0);
if (auto_menu) { if (auto_menu)
user_file_menu_cmd (); midnight_execute_cmd (NULL, NULL, CK_UserMenuCmd, NULL);
}
return MSG_HANDLED; return MSG_HANDLED;
case DLG_KEY: case DLG_KEY:
@ -1598,11 +1603,6 @@ midnight_callback (struct Dlg_head *h, dlg_msg_t msg, int parm)
if (the_menubar->is_active) if (the_menubar->is_active)
return MSG_NOT_HANDLED; return MSG_NOT_HANDLED;
if (parm == KEY_F (10)) {
quit_cmd ();
return MSG_HANDLED;
}
if (parm == '\t') if (parm == '\t')
free_completions (cmdline); free_completions (cmdline);