mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-28 16:01:10 +02:00
gui/widget/menue.cpp: check item's direct key only on key events
Origin commit data
------------------
Branch: ni/coolstream
Commit: e295500984
Author: [CST] Focus <focus.cst@gmail.com>
Date: 2012-07-17 (Tue, 17 Jul 2012)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -300,6 +300,7 @@ CMenuWidget::CMenuWidget()
|
|||||||
savescreen = false;
|
savescreen = false;
|
||||||
background = NULL;
|
background = NULL;
|
||||||
preselected = -1;
|
preselected = -1;
|
||||||
|
details_line = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
CMenuWidget::CMenuWidget(const neutrino_locale_t Name, const std::string & Icon, const int mwidth, const mn_widget_id_t &w_index)
|
CMenuWidget::CMenuWidget(const neutrino_locale_t Name, const std::string & Icon, const int mwidth, const mn_widget_id_t &w_index)
|
||||||
@@ -512,27 +513,27 @@ int CMenuWidget::exec(CMenuTarget* parent, const std::string &)
|
|||||||
|
|
||||||
do {
|
do {
|
||||||
if(hasItem() && selected >= 0 && (int)items.size() > selected )
|
if(hasItem() && selected >= 0 && (int)items.size() > selected )
|
||||||
bAllowRepeatLR = items[selected]->isMenueOptionChooser(); //can_arrow;
|
bAllowRepeatLR = items[selected]->isMenueOptionChooser();
|
||||||
|
|
||||||
g_RCInput->getMsgAbsoluteTimeout(&msg, &data, &timeoutEnd, bAllowRepeatLR);
|
g_RCInput->getMsgAbsoluteTimeout(&msg, &data, &timeoutEnd, bAllowRepeatLR);
|
||||||
|
|
||||||
|
int handled= false;
|
||||||
if ( msg <= CRCInput::RC_MaxRC ) {
|
if ( msg <= CRCInput::RC_MaxRC ) {
|
||||||
timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_MENU] == 0 ? 0xFFFF : g_settings.timing[SNeutrinoSettings::TIMING_MENU]);
|
timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_MENU] == 0 ? 0xFFFF : g_settings.timing[SNeutrinoSettings::TIMING_MENU]);
|
||||||
}
|
|
||||||
int handled= false;
|
|
||||||
|
|
||||||
for (unsigned int i= 0; i< items.size(); i++) {
|
for (unsigned int i= 0; i< items.size(); i++) {
|
||||||
CMenuItem* titem = items[i];
|
CMenuItem* titem = items[i];
|
||||||
if ((titem->directKey != CRCInput::RC_nokey) && (titem->directKey == msg)) {
|
if ((titem->directKey != CRCInput::RC_nokey) && (titem->directKey == msg)) {
|
||||||
if (titem->isSelectable()) {
|
if (titem->isSelectable()) {
|
||||||
items[selected]->paint( false );
|
items[selected]->paint( false );
|
||||||
selected= i;
|
selected= i;
|
||||||
msg= CRCInput::RC_ok;
|
msg= CRCInput::RC_ok;
|
||||||
} else {
|
} else {
|
||||||
// swallow-key...
|
// swallow-key...
|
||||||
handled= true;
|
handled= true;
|
||||||
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user