mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-22 20:36:50 +03:00
Menubar is always on top line of screen.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
parent
9c0c2b77af
commit
2b55c54efc
@ -935,14 +935,15 @@ destroy_menu (menu_t * menu)
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
||||
WMenuBar *
|
||||
menubar_new (int y, int x, int cols, GList * menu, gboolean visible)
|
||||
menubar_new (GList * menu, gboolean visible)
|
||||
{
|
||||
WMenuBar *menubar;
|
||||
Widget *w;
|
||||
|
||||
menubar = g_new0 (WMenuBar, 1);
|
||||
w = WIDGET (menubar);
|
||||
widget_init (w, y, x, 1, cols, menubar_callback, menubar_mouse_callback);
|
||||
widget_init (w, 0, 0, 1, COLS, menubar_callback, menubar_mouse_callback);
|
||||
w->pos_flags = WPOS_KEEP_HORZ | WPOS_KEEP_TOP;
|
||||
/* initially, menubar is not selectable */
|
||||
widget_set_options (w, WOP_SELECTABLE, FALSE);
|
||||
w->options |= WOP_TOP_SELECT;
|
||||
|
@ -48,7 +48,7 @@ menu_t *create_menu (const char *name, GList * entries, const char *help_node);
|
||||
void menu_set_name (menu_t * menu, const char *name);
|
||||
void destroy_menu (menu_t * menu);
|
||||
|
||||
WMenuBar *menubar_new (int y, int x, int cols, GList * menu, gboolean visible);
|
||||
WMenuBar *menubar_new (GList * menu, gboolean visible);
|
||||
void menubar_set_menu (WMenuBar * menubar, GList * menu);
|
||||
void menubar_add_menu (WMenuBar * menubar, menu_t * menu);
|
||||
void menubar_arrange (WMenuBar * menubar);
|
||||
|
@ -1251,7 +1251,7 @@ edit_files (const GList * files)
|
||||
edit_dlg->get_shortcut = edit_get_shortcut;
|
||||
edit_dlg->get_title = edit_get_title;
|
||||
|
||||
menubar = menubar_new (0, 0, COLS, NULL, TRUE);
|
||||
menubar = menubar_new (NULL, TRUE);
|
||||
add_widget (edit_dlg, menubar);
|
||||
edit_init_menu (menubar);
|
||||
|
||||
|
@ -922,7 +922,7 @@ create_file_manager (void)
|
||||
/* allow rebind tab */
|
||||
widget_want_tab (WIDGET (midnight_dlg), TRUE);
|
||||
|
||||
the_menubar = menubar_new (0, 0, COLS, NULL, menubar_visible);
|
||||
the_menubar = menubar_new (NULL, menubar_visible);
|
||||
add_widget (midnight_dlg, the_menubar);
|
||||
init_menu ();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user