mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-26 23:13:13 +02:00
CMenuWidget: fix "left" key for menuchoosers where
the "decrement menu function" got lost by the last "simplify code and add missing break" commit. The implicit fallthrough actually was used to execute the "left" function. Reorganize the code so that it works even without the implicit fallthrough.
This commit is contained in:
committed by
Jacek Jendrzej
parent
99cc7f850a
commit
ab3434e278
@@ -928,22 +928,16 @@ int CMenuWidget::exec(CMenuTarget* parent, const std::string &)
|
||||
break;
|
||||
}
|
||||
case (CRCInput::RC_left):
|
||||
{
|
||||
if(hasItem() && selected > -1 && (int)items.size() > selected) {
|
||||
CMenuItem* itemX = items[selected];
|
||||
if (!itemX->isMenueOptionChooser()) {
|
||||
if (g_settings.menu_left_exit)
|
||||
case (CRCInput::RC_right):
|
||||
case (CRCInput::RC_ok):
|
||||
if (hasItem() && selected > -1 && (int)items.size() > selected) {
|
||||
//exec this item...
|
||||
CMenuItem* item = items[selected];
|
||||
if (msg == CRCInput::RC_left && g_settings.menu_left_exit &&
|
||||
!item->isMenueOptionChooser()) {
|
||||
msg = CRCInput::RC_timeout;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
case (CRCInput::RC_right):
|
||||
case (CRCInput::RC_ok):
|
||||
{
|
||||
if(hasItem() && selected > -1 && (int)items.size() > selected) {
|
||||
//exec this item...
|
||||
CMenuItem* item = items[selected];
|
||||
if (!item->isSelectable())
|
||||
break;
|
||||
item->msg = msg;
|
||||
@@ -967,7 +961,6 @@ int CMenuWidget::exec(CMenuTarget* parent, const std::string &)
|
||||
}
|
||||
} else
|
||||
msg = CRCInput::RC_timeout;
|
||||
}
|
||||
break;
|
||||
|
||||
case (CRCInput::RC_home):
|
||||
|
Reference in New Issue
Block a user