(menubar_new): add 3rd 'visible' argument.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
Andrew Borodin 2013-07-27 10:15:43 +04:00
parent f029a529d2
commit b451e8d13d
4 changed files with 5 additions and 5 deletions

View File

@ -836,7 +836,7 @@ destroy_menu (menu_t * menu)
/* --------------------------------------------------------------------------------------------- */
WMenuBar *
menubar_new (int y, int x, int cols, GList * menu)
menubar_new (int y, int x, int cols, GList * menu, gboolean visible)
{
WMenuBar *menubar;
Widget *w;
@ -845,7 +845,7 @@ menubar_new (int y, int x, int cols, GList * menu)
w = WIDGET (menubar);
widget_init (w, y, x, 1, cols, menubar_callback, menubar_event);
menubar->is_visible = TRUE; /* by default */
menubar->is_visible = visible;
widget_want_cursor (w, FALSE);
menubar_set_menu (menubar, menu);

View File

@ -49,7 +49,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);
WMenuBar *menubar_new (int y, int x, int cols, 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);

View File

@ -1217,7 +1217,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);
menubar = menubar_new (0, 0, COLS, NULL, TRUE);
add_widget (edit_dlg, menubar);
edit_init_menu (menubar);

View File

@ -711,7 +711,7 @@ create_panels (void)
the_hint->auto_adjust_cols = 0;
WIDGET (the_hint)->cols = COLS;
the_menubar = menubar_new (0, 0, COLS, NULL);
the_menubar = menubar_new (0, 0, COLS, NULL, menubar_visible);
}
/* --------------------------------------------------------------------------------------------- */