From b451e8d13ddf89f1b1a00b1c2f240e4deaf8abe7 Mon Sep 17 00:00:00 2001 From: Andrew Borodin Date: Sat, 27 Jul 2013 10:15:43 +0400 Subject: [PATCH] (menubar_new): add 3rd 'visible' argument. Signed-off-by: Andrew Borodin --- lib/widget/menu.c | 4 ++-- lib/widget/menu.h | 2 +- src/editor/editwidget.c | 2 +- src/filemanager/midnight.c | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/widget/menu.c b/lib/widget/menu.c index 606063c26..ad2143a32 100644 --- a/lib/widget/menu.c +++ b/lib/widget/menu.c @@ -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); diff --git a/lib/widget/menu.h b/lib/widget/menu.h index da1acf4de..9b72593eb 100644 --- a/lib/widget/menu.h +++ b/lib/widget/menu.h @@ -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); diff --git a/src/editor/editwidget.c b/src/editor/editwidget.c index e387c783b..d7730861f 100644 --- a/src/editor/editwidget.c +++ b/src/editor/editwidget.c @@ -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); diff --git a/src/filemanager/midnight.c b/src/filemanager/midnight.c index 9caf53cdf..6401a1a9c 100644 --- a/src/filemanager/midnight.c +++ b/src/filemanager/midnight.c @@ -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); } /* --------------------------------------------------------------------------------------------- */