X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=scripts%2Fkconfig%2Fgconf.c;h=65464366fe389ab67e631c64646717c67303d05b;hb=baea7b946f00a291b166ccae7fcfed6c01530cc6;hp=61d8166166ef86177cf28b65575a9004f7113c08;hpb=e25db641c0e6dd49c5db24dbe154048d4a466727;p=mv-sheeva.git diff --git a/scripts/kconfig/gconf.c b/scripts/kconfig/gconf.c index 61d8166166e..65464366fe3 100644 --- a/scripts/kconfig/gconf.c +++ b/scripts/kconfig/gconf.c @@ -38,9 +38,6 @@ static gboolean show_all = FALSE; static gboolean show_debug = FALSE; static gboolean resizeable = FALSE; -static char nohelp_text[] = - N_("Sorry, no help available for this option yet.\n"); - GtkWidget *main_wnd = NULL; GtkWidget *tree1_w = NULL; // left frame GtkWidget *tree2_w = NULL; // right frame @@ -122,8 +119,6 @@ const char *dbg_print_flags(int val) strcat(buf, "choice/"); if (val & SYMBOL_CHOICEVAL) strcat(buf, "choiceval/"); - if (val & SYMBOL_PRINTED) - strcat(buf, "printed/"); if (val & SYMBOL_VALID) strcat(buf, "valid/"); if (val & SYMBOL_OPTIONAL) @@ -460,19 +455,10 @@ static void text_insert_help(struct menu *menu) { GtkTextBuffer *buffer; GtkTextIter start, end; - const char *prompt = menu_get_prompt(menu); - gchar *name; - const char *help = _(nohelp_text); - - if (!menu->sym) - help = ""; - else if (menu->sym->help) - help = _(menu->sym->help); + const char *prompt = _(menu_get_prompt(menu)); + struct gstr help = str_new(); - if (menu->sym && menu->sym->name) - name = g_strdup_printf(_(menu->sym->name)); - else - name = g_strdup(""); + menu_get_ext_help(menu, &help); buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(text_w)); gtk_text_buffer_get_bounds(buffer, &start, &end); @@ -482,14 +468,11 @@ static void text_insert_help(struct menu *menu) gtk_text_buffer_get_end_iter(buffer, &end); gtk_text_buffer_insert_with_tags(buffer, &end, prompt, -1, tag1, NULL); - gtk_text_buffer_insert_at_cursor(buffer, " ", 1); - gtk_text_buffer_get_end_iter(buffer, &end); - gtk_text_buffer_insert_with_tags(buffer, &end, name, -1, tag1, - NULL); gtk_text_buffer_insert_at_cursor(buffer, "\n\n", 2); gtk_text_buffer_get_end_iter(buffer, &end); - gtk_text_buffer_insert_with_tags(buffer, &end, help, -1, tag2, + gtk_text_buffer_insert_with_tags(buffer, &end, str_get(&help), -1, tag2, NULL); + str_free(&help); } @@ -1177,7 +1160,7 @@ static gchar **fill_row(struct menu *menu) bzero(row, sizeof(row)); row[COL_OPTION] = - g_strdup_printf("%s %s", menu_get_prompt(menu), + g_strdup_printf("%s %s", _(menu_get_prompt(menu)), sym && sym_has_value(sym) ? "(NEW)" : ""); if (show_all && !menu_is_visible(menu)) @@ -1227,7 +1210,7 @@ static gchar **fill_row(struct menu *menu) if (def_menu) row[COL_VALUE] = - g_strdup(menu_get_prompt(def_menu)); + g_strdup(_(menu_get_prompt(def_menu))); } if (sym->flags & SYMBOL_CHOICEVAL) row[COL_BTNRAD] = GINT_TO_POINTER(TRUE);