diff options
author | Sam Ravnborg <sam@ravnborg.org> | 2007-07-20 18:00:36 -0400 |
---|---|---|
committer | Sam Ravnborg <sam@ravnborg.org> | 2007-07-25 15:14:26 -0400 |
commit | 03d29122738f0bd81afd44b1f566e64ebf8d06fe (patch) | |
tree | 10038c037b7b82577fec387fa6cd8042fc8633e7 /scripts/kconfig/gconf.c | |
parent | 4a645d5ea65baaa5736bcb566673bf4a351b2ad8 (diff) |
kconfig: attach help text to menus
Roman Zippel wrote:
> A simple example would be
> help texts, right now they are per symbol, but they should really be per
> menu, so archs can provide different help texts for something.
This patch does this and at the same time introduce a few API
funtions used to access the help text.
The relevant api functions are introduced in the various frontends.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Roman Zippel <zippel@linux-m68k.org>
Diffstat (limited to 'scripts/kconfig/gconf.c')
-rw-r--r-- | scripts/kconfig/gconf.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/scripts/kconfig/gconf.c b/scripts/kconfig/gconf.c index 61d8166166e..262908cfc2a 100644 --- a/scripts/kconfig/gconf.c +++ b/scripts/kconfig/gconf.c | |||
@@ -38,9 +38,6 @@ static gboolean show_all = FALSE; | |||
38 | static gboolean show_debug = FALSE; | 38 | static gboolean show_debug = FALSE; |
39 | static gboolean resizeable = FALSE; | 39 | static gboolean resizeable = FALSE; |
40 | 40 | ||
41 | static char nohelp_text[] = | ||
42 | N_("Sorry, no help available for this option yet.\n"); | ||
43 | |||
44 | GtkWidget *main_wnd = NULL; | 41 | GtkWidget *main_wnd = NULL; |
45 | GtkWidget *tree1_w = NULL; // left frame | 42 | GtkWidget *tree1_w = NULL; // left frame |
46 | GtkWidget *tree2_w = NULL; // right frame | 43 | GtkWidget *tree2_w = NULL; // right frame |
@@ -462,12 +459,9 @@ static void text_insert_help(struct menu *menu) | |||
462 | GtkTextIter start, end; | 459 | GtkTextIter start, end; |
463 | const char *prompt = menu_get_prompt(menu); | 460 | const char *prompt = menu_get_prompt(menu); |
464 | gchar *name; | 461 | gchar *name; |
465 | const char *help = _(nohelp_text); | 462 | const char *help; |
466 | 463 | ||
467 | if (!menu->sym) | 464 | help = _(menu_get_help(menu)); |
468 | help = ""; | ||
469 | else if (menu->sym->help) | ||
470 | help = _(menu->sym->help); | ||
471 | 465 | ||
472 | if (menu->sym && menu->sym->name) | 466 | if (menu->sym && menu->sym->name) |
473 | name = g_strdup_printf(_(menu->sym->name)); | 467 | name = g_strdup_printf(_(menu->sym->name)); |