Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 359228
b: refs/heads/master
c: 337a275
h: refs/heads/master
v: v3
  • Loading branch information
Yann E. MORIN authored and Michal Marek committed Nov 20, 2012
1 parent c3c7fe1 commit edad660
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7d5bb966290d71d9dfe69a3ed0c31b26bf9afc63
refs/heads/master: 337a275d03e0b900dc8ac3ab5583d18099fedae6
10 changes: 8 additions & 2 deletions trunk/scripts/kconfig/mconf.c
Original file line number Diff line number Diff line change
Expand Up @@ -348,15 +348,19 @@ static void search_conf(void)
{
struct symbol **sym_arr;
struct gstr res;
struct gstr title;
char *dialog_input;
int dres, vscroll = 0, hscroll = 0;
bool again;

title = str_new();
str_printf( &title, _("Enter %s (sub)string to search for "
"(with or without \"%s\")"), CONFIG_, CONFIG_);

again:
dialog_clear();
dres = dialog_inputbox(_("Search Configuration Parameter"),
_("Enter " CONFIG_ " (sub)string to search for "
"(with or without \"" CONFIG_ "\")"),
str_get(&title),
10, 75, "");
switch (dres) {
case 0:
Expand All @@ -365,6 +369,7 @@ static void search_conf(void)
show_helptext(_("Search Configuration"), search_help);
goto again;
default:
str_free(&title);
return;
}

Expand Down Expand Up @@ -398,6 +403,7 @@ static void search_conf(void)
str_free(&res);
} while (again);
free(sym_arr);
str_free(&title);
}

static void build_conf(struct menu *menu)
Expand Down
11 changes: 9 additions & 2 deletions trunk/scripts/kconfig/nconf.c
Original file line number Diff line number Diff line change
Expand Up @@ -696,13 +696,18 @@ static void search_conf(void)
{
struct symbol **sym_arr;
struct gstr res;
struct gstr title;
char *dialog_input;
int dres;

title = str_new();
str_printf( &title, _("Enter %s (sub)string to search for "
"(with or without \"%s\")"), CONFIG_, CONFIG_);

again:
dres = dialog_inputbox(main_window,
_("Search Configuration Parameter"),
_("Enter " CONFIG_ " (sub)string to search for "
"(with or without \"" CONFIG_ "\")"),
str_get(&title),
"", &dialog_input_result, &dialog_input_result_len);
switch (dres) {
case 0:
Expand All @@ -712,6 +717,7 @@ static void search_conf(void)
_("Search Configuration"), search_help);
goto again;
default:
str_free(&title);
return;
}

Expand All @@ -726,6 +732,7 @@ static void search_conf(void)
show_scroll_win(main_window,
_("Search Results"), str_get(&res));
str_free(&res);
str_free(&title);
}


Expand Down

0 comments on commit edad660

Please sign in to comment.