linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Allow menuconfig to cycle through choices
       [not found] ` <4b73d43f0604061339n35a4d98ha08bf8d7fc0bef0b@mail.gmail.com>
@ 2006-04-06 20:58   ` John Rigby
  2006-04-06 22:40     ` Randy.Dunlap
  0 siblings, 1 reply; 4+ messages in thread
From: John Rigby @ 2006-04-06 20:58 UTC (permalink / raw)
  To: Roman Zippel; +Cc: Sam Ravnborg, lkml

[-- Attachment #1: Type: text/plain, Size: 2 bytes --]



[-- Attachment #2: 0001-Allow-menuconfig-to-cycle-through-choices.txt --]
[-- Type: text/plain, Size: 1205 bytes --]

>From nobody Mon Sep 17 00:00:00 2001
From: John Rigby <jrigby@freescale.com>
Date: Thu Apr 6 14:25:19 2006 -0600
Subject: [PATCH] Allow menuconfig to cycle through choices

Added cycling logic to dialog_checklist identical to what
dialog_menu already has.

Signed-off-by: John Rigby <jrigby@freescale.com>

---

 scripts/kconfig/lxdialog/checklist.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

8c5500ea727987ea35a7ccaa463dcaf50eb731b2
diff --git a/scripts/kconfig/lxdialog/checklist.c b/scripts/kconfig/lxdialog/checklist.c
index db07ae7..af41cb1 100644
--- a/scripts/kconfig/lxdialog/checklist.c
+++ b/scripts/kconfig/lxdialog/checklist.c
@@ -203,10 +203,15 @@ int dialog_checklist(const char *title, 
 	while (key != ESC) {
 		key = wgetch(dialog);
 
-		for (i = 0; i < max_choice; i++)
+		for (i = choice + 1; i < max_choice; i++)
 			if (toupper(key) ==
 			    toupper(items[(scroll + i) * 3 + 1][0]))
 				break;
+		if (i == max_choice)
+			for (i = 0; i < max_choice; i++)
+			    if (toupper(key) ==
+				toupper(items[(scroll + i) * 3 + 1][0]))
+				    break;
 
 		if (i < max_choice || key == KEY_UP || key == KEY_DOWN ||
 		    key == '+' || key == '-') {
-- 
1.2.4





^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] Allow menuconfig to cycle through choices
  2006-04-06 20:58   ` [PATCH] Allow menuconfig to cycle through choices John Rigby
@ 2006-04-06 22:40     ` Randy.Dunlap
  2006-04-06 23:04       ` Randy.Dunlap
  0 siblings, 1 reply; 4+ messages in thread
From: Randy.Dunlap @ 2006-04-06 22:40 UTC (permalink / raw)
  To: John Rigby; +Cc: zippel, sam, linux-kernel

On Thu, 6 Apr 2006 14:58:34 -0600 John Rigby wrote:

> 
> 
Subject: [PATCH] Allow menuconfig to cycle through choices

Added cycling logic to dialog_checklist identical to what
dialog_menu already has.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Hi,
Can you give an example of a checklist (aka radiolist in menuconfig)
where this change has an effect?

I expected Timer frequency (choosing between 100, 250, 1000 HZ) to
cycle, but it does not.  And I expected Default I/O scheduler
to cycle, but it does not.  So where can I look for a change
after applying this patch?

Thanks,
---
~Randy

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Allow menuconfig to cycle through choices
  2006-04-06 22:40     ` Randy.Dunlap
@ 2006-04-06 23:04       ` Randy.Dunlap
       [not found]         ` <4b73d43f0604061754j7a6e5dccu1d9af4b3167e9758@mail.gmail.com>
  0 siblings, 1 reply; 4+ messages in thread
From: Randy.Dunlap @ 2006-04-06 23:04 UTC (permalink / raw)
  To: Randy.Dunlap; +Cc: jcrigby, zippel, sam, linux-kernel

On Thu, 6 Apr 2006 15:40:40 -0700 Randy.Dunlap wrote:

> On Thu, 6 Apr 2006 14:58:34 -0600 John Rigby wrote:
> 
> > 
> > 
> Subject: [PATCH] Allow menuconfig to cycle through choices
> 
> Added cycling logic to dialog_checklist identical to what
> dialog_menu already has.
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> Hi,
> Can you give an example of a checklist (aka radiolist in menuconfig)
> where this change has an effect?
> 
> I expected Timer frequency (choosing between 100, 250, 1000 HZ) to
> cycle, but it does not.  And I expected Default I/O scheduler
> to cycle, but it does not.  So where can I look for a change
> after applying this patch?

Ah, I see, it cycles on the Select / Exit / Help choices, e.g,

---
~Randy

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Allow menuconfig to cycle through choices
       [not found]         ` <4b73d43f0604061754j7a6e5dccu1d9af4b3167e9758@mail.gmail.com>
@ 2006-04-07 20:47           ` Roman Zippel
  0 siblings, 0 replies; 4+ messages in thread
From: Roman Zippel @ 2006-04-07 20:47 UTC (permalink / raw)
  To: John Rigby; +Cc: Randy.Dunlap, sam, linux-kernel

Hi,

On Thu, 6 Apr 2006, John Rigby wrote:

> If you have multiple configs inside a choice with prompts that start with the
> same character typing the first character takes you to the first one under
> the old behavior.  You have to use arrow or +/- keys to go to the other choices.
> 
> With the patch typing the first character will cycle between all the
> prompts starting
> with that character.
> 
> This behavior is always been available in normal "menus" which are handled by
> dialog_menu.  This patch adds the same functionality to dialog_checklist.

Could you add this information to the patch description? It had me a 
little confused too, what the patch actually does, otherwise:

Acked-by: Roman Zippel <zippel@linux-m68k.org>

bye, Roman

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-04-07 20:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <4b73d43f0604061338i1c5315f1t34761380b620fc57@mail.gmail.com>
     [not found] ` <4b73d43f0604061339n35a4d98ha08bf8d7fc0bef0b@mail.gmail.com>
2006-04-06 20:58   ` [PATCH] Allow menuconfig to cycle through choices John Rigby
2006-04-06 22:40     ` Randy.Dunlap
2006-04-06 23:04       ` Randy.Dunlap
     [not found]         ` <4b73d43f0604061754j7a6e5dccu1d9af4b3167e9758@mail.gmail.com>
2006-04-07 20:47           ` Roman Zippel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).