@@ -236,16 +236,19 @@ search_help[] = N_(
236
236
"Result:\n"
237
237
"-----------------------------------------------------------------\n"
238
238
"Symbol: FOO [=m]\n"
239
+ "Type : tristate\n"
239
240
"Prompt: Foo bus is used to drive the bar HW\n"
240
- "Defined at drivers/pci/Kconfig:47\n"
241
- "Depends on: X86_LOCAL_APIC && X86_IO_APIC || IA64\n"
242
- "Location:\n"
243
- " -> Bus options (PCI, PCMCIA, EISA, ISA)\n"
244
- " -> PCI support (PCI [=y])\n"
245
- " -> PCI access mode (<choice> [=y])\n"
246
- "Selects: LIBCRC32\n"
247
- "Selected by: BAR\n"
241
+ " Defined at drivers/pci/Kconfig:47\n"
242
+ " Depends on: X86_LOCAL_APIC && X86_IO_APIC || IA64\n"
243
+ " Location:\n"
244
+ " -> Bus options (PCI, PCMCIA, EISA, ISA)\n"
245
+ " -> PCI support (PCI [=y])\n"
246
+ "(1) -> PCI access mode (<choice> [=y])\n"
247
+ " Selects: LIBCRC32\n"
248
+ " Selected by: BAR\n"
248
249
"-----------------------------------------------------------------\n"
250
+ "o The line 'Type:' shows the type of the configuration option for\n"
251
+ " this symbol (boolean, tristate, string, ...)\n"
249
252
"o The line 'Prompt:' shows the text used in the menu structure for\n"
250
253
" this symbol\n"
251
254
"o The 'Defined at' line tell at what file / line number the symbol\n"
@@ -254,8 +257,12 @@ search_help[] = N_(
254
257
" this symbol to be visible in the menu (selectable)\n"
255
258
"o The 'Location:' lines tell where in the menu structure this symbol\n"
256
259
" is located\n"
257
- " A location followed by a [=y] indicate that this is a selectable\n"
258
- " menu item - and current value is displayed inside brackets.\n"
260
+ " A location followed by a [=y] indicates that this is a\n"
261
+ " selectable menu item - and the current value is displayed inside\n"
262
+ " brackets.\n"
263
+ " Press the key in the (#) prefix to jump directly to that\n"
264
+ " location. You will be returned to the current search results\n"
265
+ " after exiting this new menu.\n"
259
266
"o The 'Selects:' line tell what symbol will be automatically\n"
260
267
" selected if this symbol is selected (y or m)\n"
261
268
"o The 'Selected by' line tell what symbol has selected this symbol\n"
@@ -274,7 +281,7 @@ static int child_count;
274
281
static int single_menu_mode ;
275
282
static int show_all_options ;
276
283
277
- static void conf (struct menu * menu );
284
+ static void conf (struct menu * menu , struct menu * active_menu );
278
285
static void conf_choice (struct menu * menu );
279
286
static void conf_string (struct menu * menu );
280
287
static void conf_load (void );
@@ -308,7 +315,9 @@ static void search_conf(void)
308
315
struct symbol * * sym_arr ;
309
316
struct gstr res ;
310
317
char * dialog_input ;
311
- int dres ;
318
+ int dres , vscroll = 0 , hscroll = 0 ;
319
+ bool again ;
320
+
312
321
again :
313
322
dialog_clear ();
314
323
dres = dialog_inputbox (_ ("Search Configuration Parameter" ),
@@ -331,10 +340,24 @@ static void search_conf(void)
331
340
dialog_input += strlen (CONFIG_ );
332
341
333
342
sym_arr = sym_re_search (dialog_input );
334
- res = get_relations_str (sym_arr );
343
+ do {
344
+ struct menu * jumps [JUMP_NB ] = {0 };
345
+ int keys [JUMP_NB + 1 ] = {0 }, i ;
346
+
347
+ res = get_relations_str (sym_arr , jumps );
348
+ for (i = 0 ; i < JUMP_NB && jumps [i ]; i ++ )
349
+ keys [i ] = '1' + i ;
350
+ dres = show_textbox_ext (_ ("Search Results" ), str_get (& res ), 0 ,
351
+ 0 , keys , & vscroll , & hscroll );
352
+ again = false;
353
+ for (i = 0 ; i < JUMP_NB && jumps [i ]; i ++ )
354
+ if (dres == keys [i ]) {
355
+ conf (jumps [i ]-> parent , jumps [i ]);
356
+ again = true;
357
+ }
358
+ str_free (& res );
359
+ } while (again );
335
360
free (sym_arr );
336
- show_textbox (_ ("Search Results" ), str_get (& res ), 0 , 0 );
337
- str_free (& res );
338
361
}
339
362
340
363
static void build_conf (struct menu * menu )
@@ -515,12 +538,11 @@ static void build_conf(struct menu *menu)
515
538
indent -= doint ;
516
539
}
517
540
518
- static void conf (struct menu * menu )
541
+ static void conf (struct menu * menu , struct menu * active_menu )
519
542
{
520
543
struct menu * submenu ;
521
544
const char * prompt = menu_get_prompt (menu );
522
545
struct symbol * sym ;
523
- struct menu * active_menu = NULL ;
524
546
int res ;
525
547
int s_scroll = 0 ;
526
548
@@ -563,13 +585,13 @@ static void conf(struct menu *menu)
563
585
if (single_menu_mode )
564
586
submenu -> data = (void * ) (long ) !submenu -> data ;
565
587
else
566
- conf (submenu );
588
+ conf (submenu , NULL );
567
589
break ;
568
590
case 't' :
569
591
if (sym_is_choice (sym ) && sym_get_tristate_value (sym ) == yes )
570
592
conf_choice (submenu );
571
593
else if (submenu -> prompt -> type == P_MENU )
572
- conf (submenu );
594
+ conf (submenu , NULL );
573
595
break ;
574
596
case 's' :
575
597
conf_string (submenu );
@@ -608,7 +630,7 @@ static void conf(struct menu *menu)
608
630
if (item_is_tag ('t' ))
609
631
sym_toggle_tristate_value (sym );
610
632
else if (item_is_tag ('m' ))
611
- conf (submenu );
633
+ conf (submenu , NULL );
612
634
break ;
613
635
case 7 :
614
636
search_conf ();
@@ -877,7 +899,7 @@ int main(int ac, char **av)
877
899
878
900
set_config_filename (conf_get_configname ());
879
901
do {
880
- conf (& rootmenu );
902
+ conf (& rootmenu , NULL );
881
903
res = handle_exit ();
882
904
} while (res == KEY_ESC );
883
905
0 commit comments