mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] fix menuconfig help for choice menus
@ 2003-04-08 23:28 Mitch Adair
  0 siblings, 0 replies; only message in thread
From: Mitch Adair @ 2003-04-08 23:28 UTC (permalink / raw)
  To: torvalds; +Cc: zippel, linux-kernel

Menuconfig currently doesn't show the help texts that go along with config
options inside a choice menu.  (A good example is the "Processor family"
submenu - none of the per-processor help texts show up.)

The following patch fixes this - menuconfig now shows the help text for
the config option under the cursor.

	M


diff -urN linux-2.5.67/scripts/kconfig/mconf.c linux-2.5.67-mod/scripts/kconfig/mconf.c
--- linux-2.5.67/scripts/kconfig/mconf.c	Fri Mar 21 13:25:48 2003
+++ linux-2.5.67-mod/scripts/kconfig/mconf.c	Tue Apr  8 15:34:00 2003
@@ -627,7 +627,8 @@
 			sym_set_tristate_value(menu->sym, yes);
 			return;
 		case 1:
-			show_help(menu);
+			if (sscanf(input_buf, "%p", &child) == 1)
+				show_help(child);
 			break;
 		case 255:
 			return;
diff -urN linux-2.5.67/scripts/lxdialog/checklist.c linux-2.5.67-mod/scripts/lxdialog/checklist.c
--- linux-2.5.67/scripts/lxdialog/checklist.c	Tue Mar  4 21:29:18 2003
+++ linux-2.5.67-mod/scripts/lxdialog/checklist.c	Tue Apr  8 17:52:03 2003
@@ -302,6 +302,21 @@
 	case 'H':
 	case 'h':
 	case '?':
+	    if (!status[scroll + choice]) {
+		for (i = 0; i < item_no; i++)
+		    status[i] = 0;
+		status[scroll + choice] = 1;
+		for (i = 0; i < max_choice; i++)
+		    print_item (list, items[(scroll + i) * 3 + 1],
+				status[scroll + i], i, i == choice);
+	    }
+	    wnoutrefresh (list);
+	    wrefresh (dialog);
+
+	    for (i = 0; i < item_no; i++) {
+		if (status[i])
+		    fprintf (stderr, "%s", items[i * 3]);
+	    }
 	    delwin (dialog);
 	    free (status);
 	    return 1;
@@ -318,36 +333,33 @@
 	case 's':
 	case ' ':
 	case '\n':
-	    if (!button) {
-		if (flag == FLAG_CHECK) {
-		    status[scroll + choice] = !status[scroll + choice];
-		    wmove (list, choice, check_x);
-		    wattrset (list, check_selected_attr);
-		    wprintw (list, "[%c]", status[scroll + choice] ? 'X' : ' ');
-		} else {
-		    if (!status[scroll + choice]) {
-			for (i = 0; i < item_no; i++)
-			    status[i] = 0;
-			status[scroll + choice] = 1;
-			for (i = 0; i < max_choice; i++)
-			    print_item (list, items[(scroll + i) * 3 + 1],
-					status[scroll + i], i, i == choice);
-		    }
+	    if (flag == FLAG_CHECK) {
+		status[scroll + choice] = !status[scroll + choice];
+		wmove (list, choice, check_x);
+		wattrset (list, check_selected_attr);
+		wprintw (list, "[%c]", status[scroll + choice] ? 'X' : ' ');
+	    } else {
+		if (!status[scroll + choice]) {
+		    for (i = 0; i < item_no; i++)
+			status[i] = 0;
+		    status[scroll + choice] = 1;
+		    for (i = 0; i < max_choice; i++)
+			print_item (list, items[(scroll + i) * 3 + 1],
+				    status[scroll + i], i, i == choice);
 		}
-		wnoutrefresh (list);
-		wrefresh (dialog);
-            
-		for (i = 0; i < item_no; i++) {
-		    if (status[i]) {
-			if (flag == FLAG_CHECK) {
-			    fprintf (stderr, "\"%s\" ", items[i * 3]);
-			} else {
-			    fprintf (stderr, "%s", items[i * 3]);
-			}
+	    }
+	    wnoutrefresh (list);
+	    wrefresh (dialog);
 
+	    for (i = 0; i < item_no; i++) {
+		if (status[i]) {
+		    if (flag == FLAG_CHECK) {
+			fprintf (stderr, "\"%s\" ", items[i * 3]);
+		    } else {
+			fprintf (stderr, "%s", items[i * 3]);
 		    }
 		}
-            }
+	    }
 	    delwin (dialog);
 	    free (status);
 	    return button;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-04-08 23:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-04-08 23:28 [PATCH] fix menuconfig help for choice menus Mitch Adair

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®