mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-23 04:46:55 +03:00
* edit.h: Eliminate global EditMenuBar. Fix all dependencies.
This commit is contained in:
parent
7511729690
commit
b5b70bce10
@ -1,5 +1,7 @@
|
||||
2005-05-20 Pavel Roskin <proski@gnu.org>
|
||||
|
||||
* edit.h: Eliminate global EditMenuBar. Fix all dependencies.
|
||||
|
||||
* edit.h: Eliminate edit_message_dialog macro - it's used
|
||||
inconsistently. Fix all callers to use query_dialog().
|
||||
|
||||
|
@ -107,12 +107,13 @@ struct macro {
|
||||
|
||||
struct WEdit;
|
||||
typedef struct WEdit WEdit;
|
||||
struct Menu;
|
||||
|
||||
int edit_drop_hotkey_menu (WEdit *e, int key);
|
||||
void edit_menu_cmd (WEdit *e);
|
||||
void edit_init_menu_emacs (void);
|
||||
void edit_init_menu_normal (void);
|
||||
void edit_done_menu (void);
|
||||
void edit_init_menu_emacs (struct Menu *EditMenuBar[]);
|
||||
void edit_init_menu_normal (struct Menu *EditMenuBar[]);
|
||||
void edit_done_menu (struct Menu *EditMenuBar[]);
|
||||
void menu_save_mode_cmd (void);
|
||||
int edit_raw_key_query (const char *heading, const char *query, int cancel);
|
||||
int edit_file (const char *_file, int line);
|
||||
@ -249,8 +250,6 @@ void edit_execute_cmd (WEdit *edit, int command, int char_for_insertion);
|
||||
extern int edit_key_emulation;
|
||||
|
||||
extern WEdit *wedit;
|
||||
struct Menu;
|
||||
extern struct Menu *EditMenuBar[];
|
||||
struct WMenu;
|
||||
extern struct WMenu *edit_menubar;
|
||||
|
||||
|
@ -409,9 +409,7 @@ static menu_entry OptMenu[] =
|
||||
|
||||
#define menu_entries(x) sizeof(x)/sizeof(menu_entry)
|
||||
|
||||
struct Menu *EditMenuBar[N_menus];
|
||||
|
||||
void edit_init_menu_normal (void)
|
||||
void edit_init_menu_normal (struct Menu *EditMenuBar[])
|
||||
{
|
||||
EditMenuBar[0] = create_menu (_(" File "), FileMenu, menu_entries (FileMenu),
|
||||
"[Internal File Editor]");
|
||||
@ -425,7 +423,7 @@ void edit_init_menu_normal (void)
|
||||
"[Internal File Editor]");
|
||||
}
|
||||
|
||||
void edit_init_menu_emacs (void)
|
||||
void edit_init_menu_emacs (struct Menu *EditMenuBar[])
|
||||
{
|
||||
EditMenuBar[0] = create_menu (_(" File "), FileMenuEmacs, menu_entries (FileMenuEmacs),
|
||||
"[Internal File Editor]");
|
||||
@ -439,7 +437,7 @@ void edit_init_menu_emacs (void)
|
||||
"[Internal File Editor]");
|
||||
}
|
||||
|
||||
void edit_done_menu (void)
|
||||
void edit_done_menu (struct Menu *EditMenuBar[])
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < N_menus; i++)
|
||||
|
@ -47,6 +47,7 @@
|
||||
|
||||
WEdit *wedit;
|
||||
struct WMenu *edit_menubar;
|
||||
struct Menu *EditMenuBar[N_menus];
|
||||
|
||||
int column_highlighting = 0;
|
||||
|
||||
@ -216,10 +217,10 @@ edit_file (const char *_file, int line)
|
||||
|
||||
switch (edit_key_emulation) {
|
||||
case EDIT_KEY_EMULATION_NORMAL:
|
||||
edit_init_menu_normal (); /* editmenu.c */
|
||||
edit_init_menu_normal (EditMenuBar); /* editmenu.c */
|
||||
break;
|
||||
case EDIT_KEY_EMULATION_EMACS:
|
||||
edit_init_menu_emacs (); /* editmenu.c */
|
||||
edit_init_menu_emacs (EditMenuBar); /* editmenu.c */
|
||||
break;
|
||||
}
|
||||
edit_menubar = menubar_new (0, 0, COLS, EditMenuBar, N_menus);
|
||||
@ -230,7 +231,7 @@ edit_file (const char *_file, int line)
|
||||
|
||||
run_dlg (edit_dlg);
|
||||
|
||||
edit_done_menu (); /* editmenu.c */
|
||||
edit_done_menu (EditMenuBar); /* editmenu.c */
|
||||
|
||||
destroy_dlg (edit_dlg);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user