From c01fc08d11e3495fa449e094045908285bf02120 Mon Sep 17 00:00:00 2001
From: Vit Rosin <vit_r@list.ru>
Date: Mon, 16 Nov 2009 17:32:40 +0000
Subject: [PATCH] some_trivial_corrections
---
edit/edit.c | 4 ++--
edit/editmenu.c | 4 ++--
misc/mc.keymap.default | 18 +++++++++---------
misc/mc.keymap.emacs | 2 +-
src/cmddef.h | 36 ++++++++++++++++++------------------
src/keybind.c | 10 ++++------
6 files changed, 36 insertions(+), 38 deletions(-)
diff --git a/edit/edit.c b/edit/edit.c
index 9a51b79..8874901 100644
a
|
b
|
edit_execute_cmd (WEdit *edit, int command, int char_for_insertion) |
3115 | 3115 | case CK_LearnKeys: |
3116 | 3116 | learn_keys (); |
3117 | 3117 | break; |
3118 | | case CK_Edit_Options: |
| 3118 | case CK_Options: |
3119 | 3119 | edit_options_dialog (); |
3120 | 3120 | break; |
3121 | | case CK_Edit_Save_Mode: |
| 3121 | case CK_Save_Mode: |
3122 | 3122 | menu_save_mode_cmd (); |
3123 | 3123 | break; |
3124 | 3124 | case CK_Date: |
diff --git a/edit/editmenu.c b/edit/editmenu.c
index 2117ba8..a46f3c1 100644
a
|
b
|
create_options_menu (void) |
177 | 177 | { |
178 | 178 | GList *entries = NULL; |
179 | 179 | |
180 | | entries = g_list_append (entries, menu_entry_create (_("&General... "), CK_Edit_Options)); |
181 | | entries = g_list_append (entries, menu_entry_create (_("Save &mode..."), CK_Edit_Save_Mode)); |
| 180 | entries = g_list_append (entries, menu_entry_create (_("&General... "), CK_Options)); |
| 181 | entries = g_list_append (entries, menu_entry_create (_("Save &mode..."), CK_Save_Mode)); |
182 | 182 | entries = g_list_append (entries, menu_entry_create (_("Learn &keys..."), CK_LearnKeys)); |
183 | 183 | entries = g_list_append (entries, menu_entry_create (_("Syntax &highlighting..."), CK_Choose_Syntax)); |
184 | 184 | entries = g_list_append (entries, menu_separator_create ()); |
diff --git a/misc/mc.keymap.default b/misc/mc.keymap.default
index f571d0d..3198ad9 100644
a
|
b
|
EditParagraphDown = |
36 | 36 | EditSave = f2 |
37 | 37 | EditLoad = |
38 | 38 | EditNew = ctrl-n |
39 | | EditSaveas = f12 |
| 39 | EditSaveAs = f12 |
40 | 40 | EditMark = f3 |
41 | 41 | EditCopy = f5 |
42 | 42 | EditMove = f6 |
… |
… |
PanelGotoTopFile = alt-g |
270 | 270 | PanelSetPanelEncoding = alt-e |
271 | 271 | PanelMoveHome = alt-lt; home |
272 | 272 | PanelMoveEnd = alt-gt; end |
273 | | PanelSelectSortOrder= |
274 | | PanelToggleSortOrderPrev= |
275 | | PanelToggleSortOrderNext= |
276 | | PanelReverseSort= |
277 | | PanelSortOrderByName= |
278 | | PanelSortOrderByExt= |
279 | | PanelSortOrderBySize= |
280 | | PanelSortOrderByMTime= |
| 273 | PanelSelectSortOrder = |
| 274 | PanelToggleSortOrderPrev = |
| 275 | PanelToggleSortOrderNext = |
| 276 | PanelReverseSort = |
| 277 | PanelSortOrderByName = |
| 278 | PanelSortOrderByExt = |
| 279 | PanelSortOrderBySize = |
| 280 | PanelSortOrderByMTime = |
281 | 281 | |
282 | 282 | |
283 | 283 | [panel:xmap] |
diff --git a/misc/mc.keymap.emacs b/misc/mc.keymap.emacs
index 1acb5cd..f9eda58 100644
a
|
b
|
EditParagraphUp = |
35 | 35 | EditParagraphDown = |
36 | 36 | EditSave = f2 |
37 | 37 | EditLoad = |
38 | | EditSaveas = f12 |
| 38 | EditSaveAs = f12 |
39 | 39 | EditMark = f3 |
40 | 40 | EditCopy = f5 |
41 | 41 | EditMove = f6 |
diff --git a/src/cmddef.h b/src/cmddef.h
index 2644130..e6c6efa 100644
a
|
b
|
|
109 | 109 | #define CK_ExtCmd 424 |
110 | 110 | #define CK_User_Menu 425 |
111 | 111 | #define CK_Find_Definition 426 |
112 | | #define CK_Edit_Options 427 |
113 | | #define CK_Edit_Save_Mode 428 |
114 | | #define CK_Choose_Syntax 429 |
115 | | #define CK_About 430 |
| 112 | #define CK_Options 427 |
| 113 | #define CK_Save_Mode 428 |
| 114 | #define CK_Choose_Syntax 429 |
| 115 | #define CK_About 430 |
116 | 116 | |
117 | 117 | #if 0 |
118 | | /* application control */ |
119 | | #define CK_Save_Desktop 451 |
120 | | #define CK_New_Window 452 |
121 | | #define CK_Cycle 453 |
122 | | #define CK_Menu 454 |
123 | | #define CK_Save_And_Quit 455 |
124 | | #define CK_Run_Another 456 |
125 | | #define CK_Check_Save_And_Quit 457 |
126 | | #define CK_Maximize 458 |
| 118 | /* application control */ |
| 119 | #define CK_Save_Desktop 451 |
| 120 | #define CK_New_Window 452 |
| 121 | #define CK_Cycle 453 |
| 122 | #define CK_Menu 454 |
| 123 | #define CK_Save_And_Quit 455 |
| 124 | #define CK_Run_Another 456 |
| 125 | #define CK_Check_Save_And_Quit 457 |
| 126 | #define CK_Maximize 458 |
127 | 127 | #endif |
128 | 128 | |
129 | 129 | #define CK_Toggle_Tab_TWS 470 |
… |
… |
|
229 | 229 | #define CK_InputPaste 4025 |
230 | 230 | #define CK_InputClearLine 4026 |
231 | 231 | |
232 | | |
233 | 232 | /* Viewer */ |
234 | 233 | #define CK_ViewSearch 5001 |
235 | 234 | #define CK_ViewContinueSearch 5002 |
… |
… |
|
377 | 376 | #define SHELL_COMMANDS_i {"/edit.indent.rc", "/edit.spell.rc", /* and so on */ 0 } |
378 | 377 | #define CK_Macro(i) (2000+(i)) |
379 | 378 | #define CK_Last_Macro CK_Macro(0x7FFF) |
| 379 | |
380 | 380 | #else |
381 | 381 | |
382 | | #define CK_User_Command(i) ((i) | (1 << 16)) |
383 | | #define IS_USER_COMMAND(i) ((i) & (1 << 16)) |
384 | | #define CK_Macro(i) ((i) | (1 << 17)) |
385 | | #define IS_MACRO_COMMAND(i) ((i) & (1 << 17)) |
| 382 | #define CK_User_Command(i) ((i) | (1 << 16)) |
| 383 | #define IS_USER_COMMAND(i) ((i) & (1 << 16)) |
| 384 | #define CK_Macro(i) ((i) | (1 << 17)) |
| 385 | #define IS_MACRO_COMMAND(i) ((i) & (1 << 17)) |
386 | 386 | |
387 | 387 | #endif /* MC_CMD_DEF_H */ |
diff --git a/src/keybind.c b/src/keybind.c
index c898e8c..338a8e1 100644
a
|
b
|
|
23 | 23 | */ |
24 | 24 | |
25 | 25 | #include <config.h> |
26 | | |
27 | 26 | #include <ctype.h> |
28 | 27 | #include <errno.h> |
29 | 28 | #include <stdarg.h> |
… |
… |
|
42 | 41 | #include "tty/tty.h" /* keys */ |
43 | 42 | #include "wtools.h" |
44 | 43 | #include "strutil.h" |
45 | | |
46 | 44 | #include "keybind.h" |
47 | 45 | |
48 | 46 | static const name_keymap_t command_names[] = { |
… |
… |
static const name_keymap_t command_names[] = { |
78 | 76 | { "EditSave", CK_Save }, |
79 | 77 | { "EditLoad", CK_Load }, |
80 | 78 | { "EditNew", CK_New }, |
81 | | { "EditSaveas", CK_Save_As }, |
| 79 | { "EditSaveAs", CK_Save_As }, |
82 | 80 | { "EditMark", CK_Mark }, |
83 | 81 | { "EditCopy", CK_Copy }, |
84 | 82 | { "EditMove", CK_Move }, |
… |
… |
static const name_keymap_t command_names[] = { |
189 | 187 | { "EditFindDefinition", CK_Find_Definition }, |
190 | 188 | { "EditLoadPrevFile", CK_Load_Prev_File }, |
191 | 189 | { "EditLoadNextFile", CK_Load_Next_File }, |
192 | | { "EditOptions", CK_Edit_Options }, |
193 | | { "EditSaveMode", CK_Edit_Save_Mode }, |
| 190 | { "EditOptions", CK_Options }, |
| 191 | { "EditSaveMode", CK_Save_Mode }, |
194 | 192 | { "EditChooseSyntax", CK_Choose_Syntax }, |
195 | 193 | { "EditAbout", CK_About }, |
196 | 194 | |
… |
… |
const global_keymap_t default_editor_keymap[] = { |
547 | 545 | { KEY_F (13), CK_Column_Mark, "S-F3" }, |
548 | 546 | { KEY_F (14), CK_Replace_Again, "S-F4" }, |
549 | 547 | { KEY_F (15), CK_Insert_File, "S-F5" }, |
550 | | { KEY_F (17), CK_Find_Again, "S-F6" }, |
| 548 | { KEY_F (17), CK_Find_Again, "S-F7" }, |
551 | 549 | /* C formatter */ |
552 | 550 | { KEY_F (19), CK_Pipe_Block (0), "S-F9" }, |
553 | 551 | |