From d05bfe1f0190e9423041f49eee50d264fbae3d84 Mon Sep 17 00:00:00 2001 From: Pavel Roskin Date: Mon, 6 Aug 2001 22:22:04 +0000 Subject: [PATCH] * boxes.c (display_init): Associate correct help topic. (sort_box): Likewise. (set_panel_filter): Likewise. * option.c (init_configure): Likewise. * menu.c (menubar_handle_key): Show help dependent on the active menu. --- src/ChangeLog | 9 +++++++++ src/boxes.c | 4 ++-- src/cmd.c | 4 +++- src/menu.c | 26 +++++++++++++++++++++++++- src/option.c | 2 +- 5 files changed, 40 insertions(+), 5 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index fbf05adae..64dee06f5 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,12 @@ +2001-08-06 Pavel Roskin + + * boxes.c (display_init): Associate correct help topic. + (sort_box): Likewise. + (set_panel_filter): Likewise. + * option.c (init_configure): Likewise. + * menu.c (menubar_handle_key): Show help dependent on the active + menu. + 2001-08-06 Andrew V. Samoilov * mad.c (mad_strdup): Return NULL if NULL is passed. diff --git a/src/boxes.c b/src/boxes.c index 04f724983..f23c7c4f9 100644 --- a/src/boxes.c +++ b/src/boxes.c @@ -187,7 +187,7 @@ display_init (int radio_sel, char *init_text, i18n_displays_flag = 1; } dd = create_dlg (0, 0, DISPLAY_Y, DISPLAY_X, dialog_colors, - display_callback, "[Left and Right Menus]", "display", + display_callback, "[Listing Mode...]", "display", DLG_CENTER | DLG_GRID); x_set_dialog_title (dd, _("Listing mode")); @@ -330,7 +330,7 @@ sort_box (sortfn *sort_fn, int *reverse, int *case_sensitive) } dd = create_dlg (0, 0, SORT_Y, SORT_X, dialog_colors, common_dialog_callback, - "[Left and Right Menus]", "sort", DLG_CENTER | DLG_GRID); + "[Sort Order...]", "sort", DLG_CENTER | DLG_GRID); x_set_dialog_title (dd, sort_title); diff --git a/src/cmd.c b/src/cmd.c index da0fee124..9c5867108 100644 --- a/src/cmd.c +++ b/src/cmd.c @@ -449,7 +449,9 @@ void set_panel_filter (WPanel *p) x = p->filter ? p->filter : easy_patterns ? "*" : "."; - reg_exp = input_dialog (_(" Filter "), _(" Set expression for filtering filenames"), x); + reg_exp = input_dialog_help (_(" Filter "), + _(" Set expression for filtering filenames"), + "[Filter...]", x); if (!reg_exp) return; set_panel_filter_to (p, reg_exp); diff --git a/src/menu.c b/src/menu.c index 1087b9069..f1714cc7c 100644 --- a/src/menu.c +++ b/src/menu.c @@ -16,13 +16,14 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include -#include "tty.h" #include #include #include #include #include "global.h" +#include "tty.h" #include "menu.h" +#include "help.h" #include "dialog.h" #include "color.h" #include "main.h" @@ -269,6 +270,29 @@ static int menubar_handle_key (WMenu *menubar, int key) return 1; } + if (key == KEY_F(1)) { + if (menubar->dropped) { + switch (menubar->selected) { + case 1: + interactive_display (NULL, "[File Menu]"); + break; + case 2: + interactive_display (NULL, "[Command Menu]"); + break; + case 3: + interactive_display (NULL, "[Options Menu]"); + break; + default: + interactive_display (NULL, "[Left and Right Menus]"); + break; + } + } else { + interactive_display (NULL, "[Menu Bar]"); + } + menubar_draw (menubar); + return 1; + } + if (key == KEY_LEFT || key == XCTRL('b')){ menubar_left (menubar); return 1; diff --git a/src/option.c b/src/option.c index ed540dd15..c375ca9d0 100644 --- a/src/option.c +++ b/src/option.c @@ -193,7 +193,7 @@ static void init_configure (void) } conf_dlg = create_dlg (0, 0, 20, first_width + second_width + 9, - dialog_colors, configure_callback, "[Options Menu]", + dialog_colors, configure_callback, "[Configuration]", "option", DLG_CENTER | DLG_GRID); x_set_dialog_title (conf_dlg, _("Configure options"));