Patch by maxime.simon: Don't allow to enter sub-menus by the space bar anymore.
This allows to have the first item selected when entering a menu, since still pressing space would not enter it unintentionally anymore, in case it's a sub- menu again. Even though it makes some sense to have "Continue booting" selected by default, it somehow feels more natural to have the first item always selected instead. Thanks! git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29832 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
48bd26db93
commit
d30acbf30b
@ -352,7 +352,7 @@ run_menu(Menu *menu)
|
||||
int32 selected;
|
||||
MenuItem *item = menu->FindSelected(&selected);
|
||||
if (item == NULL) {
|
||||
selected = menu->CountItems() - 1;
|
||||
selected = 0;
|
||||
item = menu->ItemAt(selected);
|
||||
if (item != NULL)
|
||||
item->Select(true);
|
||||
@ -414,7 +414,7 @@ run_menu(Menu *menu)
|
||||
} else if (key == TEXT_CONSOLE_KEY_RETURN
|
||||
|| key == TEXT_CONSOLE_KEY_SPACE) {
|
||||
// leave the menu
|
||||
if (item->Submenu() != NULL) {
|
||||
if (item->Submenu() != NULL && key == TEXT_CONSOLE_KEY_RETURN) {
|
||||
int32 offset = sMenuOffset;
|
||||
menu->Hide();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user