Implemented default actual shortcuts for main menu.

Some functions and commands are renamed.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
Andrew Borodin 2009-10-24 16:40:19 +04:00
parent 41989bd0c6
commit 729d4f08a9
10 changed files with 89 additions and 59 deletions

View File

@ -3076,7 +3076,7 @@ edit_execute_cmd (WEdit *edit, int command, int char_for_insertion)
case CK_Find_Definition:
edit_get_match_keyword_cmd (edit);
break;
case CK_Exit:
case CK_Quit:
dlg_stop (edit->widget.parent);
break;
case CK_New:

View File

@ -78,7 +78,7 @@ create_file_menu (void)
entries = g_list_append (entries, menu_separator_create ());
entries = g_list_append (entries, menu_entry_create (_("A&bout... "), CK_About));
entries = g_list_append (entries, menu_separator_create ());
entries = g_list_append (entries, menu_entry_create (_("&Quit F10"), CK_Exit));
entries = g_list_append (entries, menu_entry_create (_("&Quit F10"), CK_Quit));
return entries;
}
@ -101,7 +101,7 @@ create_file_menu_emacs (void)
entries = g_list_append (entries, menu_separator_create ());
entries = g_list_append (entries, menu_entry_create (_("A&bout... "), CK_About));
entries = g_list_append (entries, menu_separator_create ());
entries = g_list_append (entries, menu_entry_create (_("&Quit F10"), CK_Exit));
entries = g_list_append (entries, menu_entry_create (_("&Quit F10"), CK_Quit));
return entries;
}

View File

@ -99,7 +99,7 @@ EditDebugContinue =
EditDebugEnterCommand =
EditDebugUntilCurser =
EditInsertFile = f15
EditExit = f10
EditQuit = f10
EditToggleInsert = ins
EditHelp = f1
EditDate =
@ -152,15 +152,6 @@ EditLoadNextFile = alt-equal
SelectCodepage = alt-e
[viewer:hex]
HexViewToggleNavigationMode = tab
ViewMoveToBol = ctrl-a; home
ViewMoveToEol = ctrl-e; end
ViewMoveLeft = b; left
ViewMoveRight = f; right
ViewMoveUp = k; y; up
ViewMoveDown = j; delete; down
[viewer]
ViewSearch = question; slash; f7
ViewContinueSearch = ctrl-r; ctrl-s; f17
@ -183,23 +174,45 @@ SelectCodepage = alt-e
ShowCommandLine = ctrl-o
ViewToggleRuler = alt-r
[viewer:hex]
HexViewToggleNavigationMode = tab
ViewMoveToBol = ctrl-a; home
ViewMoveToEol = ctrl-e; end
ViewMoveLeft = b; left
ViewMoveRight = f; right
ViewMoveUp = k; y; up
ViewMoveDown = j; delete; down
[main]
CmdCopyCurrentPathname = alt-a
CmdCopyOtherPathname = alt-A
CmdFilteredView = alt-exclamation
CmdFind = alt-question
CmdUserMenu = f2
CmdView = f3
CmdViewFile = f13
CmdEdit = f4
CmdCopy = f5
CmdRename = f6
CmdMkdir = f7
CmdDelete = f8
CmdQuit = f10
CmdMenuLastSelected = f19
CmdQuietQuit = f20
CmdFind = alt-question
CmdQuickCd = alt-c
CmdQuickChdir = ctrl-backslash
CmdQuietQuit = f20
CmdReread = ctrl-r
CmdSingleDirsize = ctrl-space
CmdSuspend = ctrl-z
CmdSwapPanel = ctrl-u
CmdHistory = alt-h
CmdToggleListing = alt-t
CmdToggleShowHidden = alt-dot
ExtMap1 = ctrl-x
ShowCommandLine = ctrl-o
CmdCopyCurrentPathname = alt-a
CmdCopyOtherPathname = alt-shift-a
CmdFilteredView = alt-exclamation
CmdSelect = kpplus
CmdUnselect = kpminus
CmdReverseSelection = alt-kpasterisk
ExtMap1 = ctrl-x
[main:xmap]
CmdChmod = c
@ -208,8 +221,11 @@ CmdCompareDirs = d
CmdEditSymlink = ctrl-s
CmdLink = l
CmdSymlink = s
CmdMenuInfoCmd = i
CmdMenuInfo = i
CmdMenuQuickView = q
CmdExternalPanelize = exclamation
CmdReselectVfs = a
CmdJobs = j
[panel]
PanelStartSearch = ctrl-s; alt-s

View File

@ -348,7 +348,7 @@ copy_cmd (void)
}
/* Invoked by F6. Move/rename, default to the other panel, ignore marks. */
void ren_cmd (void)
void rename_cmd (void)
{
save_cwds_stat ();
if (panel_operate (current_panel, OP_MOVE, 0)){
@ -368,7 +368,7 @@ void copy_cmd_local (void)
}
/* Invoked by F16. Move/rename, default to the same panel. */
void ren_cmd_local (void)
void rename_cmd_local (void)
{
save_cwds_stat ();
if (panel_operate (current_panel, OP_MOVE, 1)){

View File

@ -28,16 +28,16 @@ void do_edit_at_line (const char *what, int start_line);
void edit_cmd (void);
void edit_cmd_new (void);
void copy_cmd (void);
void ren_cmd (void);
void copy_cmd_local (void);
void ren_cmd_local (void);
void delete_cmd_local (void);
void reselect_vfs (void);
void rename_cmd (void);
void rename_cmd_local (void);
void mkdir_cmd (void);
void delete_cmd (void);
void delete_cmd_local (void);
void find_cmd (void);
void filter_cmd (void);
void reread_cmd (void);
void reselect_vfs (void);
void ext_cmd (void);
void edit_mc_menu_cmd (void);
void edit_fhl_cmd (void);

View File

@ -82,7 +82,7 @@
/* misc */
#define CK_Insert_File 401
#define CK_Exit 402
#define CK_Quit 402
#define CK_Toggle_Insert 403
#define CK_Help 404
#define CK_Date 405
@ -296,7 +296,7 @@
#define CK_QuickViewCmd 7048
#define CK_QuietQuitCmd 7049
#define CK_QuitCmd 7050
#define CK_RenCmd 7051
#define CK_RenameCmd 7051
#define CK_RereadCmd 7052
#define CK_ReselectVfs 7053
#define CK_ReverseSelectionCmd 7054

View File

@ -102,7 +102,7 @@ static const name_keymap_t command_names[] = {
{ "EditDebugEnterCommand", CK_Debug_Enter_Command },
{ "EditDebugUntilCurser", CK_Debug_Until_Curser },
{ "EditInsertFile", CK_Insert_File },
{ "EditExit", CK_Exit },
{ "EditQuit", CK_Quit },
{ "EditToggleInsert", CK_Toggle_Insert },
{ "EditHelp", CK_Help },
{ "EditDate", CK_Date },
@ -290,7 +290,7 @@ static const name_keymap_t command_names[] = {
{ "CmdQuickChdir", CK_QuickChdirCmd },
{ "CmdQuickView", CK_QuickViewCmd },
{ "CmdQuietQuit", CK_QuietQuitCmd },
{ "CmdRename", CK_RenCmd },
{ "CmdRename", CK_RenameCmd },
{ "CmdReread", CK_RereadCmd },
{ "CmdReselectVfs", CK_ReselectVfs },
{ "CmdReverseSelection", CK_ReverseSelectionCmd },
@ -479,7 +479,7 @@ const global_keymap_t default_editor_keymap[] = {
{ '\n', CK_Enter, "Enter" },
{ '\t', CK_Tab, "Tab" },
{ ESC_CHAR, CK_Exit, "Esc" },
{ ESC_CHAR, CK_Quit, "Esc" },
{ KEY_BACKSPACE, CK_BackSpace, "BackSpace" },
{ KEY_DC, CK_Delete, "Delete" },
{ KEY_DOWN, CK_Down, "Down" },
@ -530,7 +530,7 @@ const global_keymap_t default_editor_keymap[] = {
{ KEY_F (6), CK_Move, "F6" },
{ KEY_F (7), CK_Find, "F7" },
{ KEY_F (8), CK_Remove, "F8" },
{ KEY_F (10), CK_Exit, "F10" },
{ KEY_F (10), CK_Quit, "F10" },
/* edit user menu */
{ KEY_F (11), CK_User_Menu, "S-F1" },
{ KEY_F (12), CK_Save_As, "S-F2" },
@ -583,7 +583,7 @@ const global_keymap_t default_editor_keymap[] = {
/* Ctrl + Shift */
{ KEY_M_SHIFT | KEY_M_CTRL | KEY_PPAGE, CK_Beginning_Of_Text_Highlight, "C-S-PageUp" },
{ KEY_M_SHIFT | KEY_M_CTRL | KEY_NPAGE, CK_End_Of_Text_Highlight, "C-S-pageDown" },
{ KEY_M_SHIFT | KEY_M_CTRL | KEY_NPAGE, CK_End_Of_Text_Highlight, "C-S-PageDown" },
{ KEY_M_SHIFT | KEY_M_CTRL | KEY_LEFT, CK_Word_Left_Highlight, "C-S-Left" },
{ KEY_M_SHIFT | KEY_M_CTRL | KEY_RIGHT, CK_Word_Right_Highlight, "C-S-Right" },
{ KEY_M_SHIFT | KEY_M_CTRL | KEY_UP, CK_Scroll_Up_Highlight, "C-S-Up" },
@ -641,31 +641,45 @@ const global_keymap_t default_panel_keymap[] = {
/* main.c */
const global_keymap_t default_main_map[] = {
{ KEY_F (19), CK_MenuLastSelectedCmd, "S-F9" },
{ KEY_F (20), CK_QuietQuitCmd, "S-10" },
{ XCTRL ('@'), CK_SingleDirsizeCmd, "C-Space" },
{ KEY_F (2), CK_UserMenuCmd, "F2" },
{ KEY_F (3), CK_ViewCmd, "F3" },
{ KEY_F (4), CK_EditCmd, "F4" },
{ KEY_F (5), CK_CopyCmd, "F5" },
{ KEY_F (6), CK_RenameCmd, "F6" },
{ KEY_F (7), CK_MkdirCmd, "F7" },
{ KEY_F (8), CK_DeleteCmd, "F6" },
{ KEY_F (10), CK_QuitCmd, "F10" },
{ KEY_F (13), CK_ViewFileCmd, "S-F3" },
{ KEY_F (19), CK_MenuLastSelectedCmd, "S-F9" },
{ KEY_F (20), CK_QuietQuitCmd, "S-10" },
{ ALT ('h'), CK_HistoryCmd, "M-h" },
{ XCTRL ('@'), CK_SingleDirsizeCmd, "C-Space" },
/* Copy useful information to the command line */
{ ALT ('a'), CK_CopyCurrentPathname, "M-a" },
{ ALT ('A'), CK_CopyOtherPathname, "M-A" },
{ ALT ('c'), CK_QuickCdCmd, "M-c" },
{ ALT ('a'), CK_CopyCurrentPathname, "M-a" },
{ ALT ('A'), CK_CopyOtherPathname, "M-A" },
{ ALT ('c'), CK_QuickCdCmd, "M-c" },
/* To access the directory hotlist */
{ XCTRL ('\\'), CK_QuickChdirCmd, "C-\\" },
{ XCTRL ('\\'), CK_QuickChdirCmd, "C-\\" },
/* Suspend */
{ XCTRL ('z'), CK_SuspendCmd, "C-z" },
{ XCTRL ('z'), CK_SuspendCmd, "C-z" },
/* The filtered view command */
{ ALT ('!'), CK_FilteredViewCmd, "M-!" },
{ ALT ('!'), CK_FilteredViewCmd, "M-!" },
/* Find file */
{ ALT ('?'), CK_FindCmd, "M-?" },
{ ALT ('?'), CK_FindCmd, "M-?" },
/* Panel refresh */
{ XCTRL ('r'), CK_RereadCmd, "C-r" },
{ XCTRL ('r'), CK_RereadCmd, "C-r" },
/* Toggle listing between long, user defined and full formats */
{ ALT ('t'), CK_ToggleListingCmd, "M-t" },
{ ALT ('t'), CK_ToggleListingCmd, "M-t" },
/* Swap panels */
{ XCTRL ('u'), CK_SwapCmd, "C-u" },
{ XCTRL ('u'), CK_SwapCmd, "C-u" },
/* View output */
{ XCTRL ('o'), CK_ShowCommandLine, "C-o" },
{ ALT ('.'), CK_ToggleShowHidden, "M-." },
{ XCTRL ('x'), CK_StartExtMap1, "C-x" },
{ XCTRL ('o'), CK_ShowCommandLine, "C-o" },
{ ALT ('.'), CK_ToggleShowHidden, "M-." },
{ XCTRL ('x'), CK_StartExtMap1, "C-x" },
/* Select/unselect group */
{ ALT ('*'), CK_SelectCmd, "M-*" },
{ KEY_KP_ADD, CK_UnselectCmd, "Gray+" },
{ KEY_KP_SUBTRACT, CK_ReverseSelectionCmd, "Gray-" },
{ 0, 0, "" }
};

View File

@ -720,7 +720,7 @@ create_file_menu (void)
entries = g_list_append (entries, menu_entry_create (_("Edit s&ymlink"), CK_EditSymlinkCmd));
entries = g_list_append (entries, menu_entry_create (_("Ch&own"), CK_ChownCmd));
entries = g_list_append (entries, menu_entry_create (_("&Advanced chown"), CK_ChownAdvancedCmd));
entries = g_list_append (entries, menu_entry_create (_("&Rename/Move"), CK_RenCmd));
entries = g_list_append (entries, menu_entry_create (_("&Rename/Move"), CK_RenameCmd));
entries = g_list_append (entries, menu_entry_create (_("&Mkdir"), CK_MkdirCmd));
entries = g_list_append (entries, menu_entry_create (_("&Delete"), CK_DeleteCmd));
entries = g_list_append (entries, menu_entry_create (_("&Quick cd"), CK_QuickCdCmd));
@ -1284,8 +1284,8 @@ midnight_execute_cmd (int command)
case CK_QuitCmd:
quit_cmd ();
break;
case CK_RenCmd:
ren_cmd ();
case CK_RenameCmd:
rename_cmd ();
break;
case CK_RereadCmd:
reread_cmd ();

View File

@ -2635,12 +2635,12 @@ typedef void (*panel_key_callback) (WPanel *);
static void cmd_do_enter(WPanel *wp) { (void) do_enter(wp); }
static void cmd_view_simple(WPanel *wp) { (void) wp; view_simple_cmd(); }
static void cmd_edit_new(WPanel *wp) { (void) wp; edit_cmd_new(); }
static void cmd_copy_local(WPanel *wp) { (void) wp;copy_cmd_local(); }
static void cmd_rename_local(WPanel *wp) { (void) wp;ren_cmd_local(); }
static void cmd_delete_local(WPanel *wp) { (void) wp;delete_cmd_local(); }
static void cmd_select(WPanel *wp) { (void) wp;select_cmd(); }
static void cmd_unselect(WPanel *wp) { (void) wp;unselect_cmd(); }
static void cmd_reverse_selection(WPanel *wp) { (void) wp;reverse_selection_cmd(); }
static void cmd_copy_local(WPanel *wp) { (void) wp; copy_cmd_local(); }
static void cmd_rename_local(WPanel *wp) { (void) wp; rename_cmd_local(); }
static void cmd_delete_local(WPanel *wp) { (void) wp; delete_cmd_local(); }
static void cmd_select(WPanel *wp) { (void) wp; select_cmd(); }
static void cmd_unselect(WPanel *wp) { (void) wp; unselect_cmd(); }
static void cmd_reverse_selection(WPanel *wp) { (void) wp; reverse_selection_cmd(); }
static cb_ret_t
panel_execute_cmd (WPanel *panel, int command)

View File

@ -105,7 +105,7 @@ key_code_name_t key_name_conv_tab[] = {
{ KEY_F (7), "f7", N_("Function key 7"), "F7" },
{ KEY_F (8), "f8", N_("Function key 8"), "F8" },
{ KEY_F (9), "f9", N_("Function key 9"), "F9" },
{ KEY_F (10), "f10", N_("Function key 10"), "F19" },
{ KEY_F (10), "f10", N_("Function key 10"), "F10" },
{ KEY_F (11), "f11", N_("Function key 11"), "F11" },
{ KEY_F (12), "f12", N_("Function key 12"), "F12" },
{ KEY_F (13), "f13", N_("Function key 13"), "F13" },