neutrino: sync keybind and usermenu code with neutrino-mp, code (C) martii

This commit is contained in:
[CST] Focus
2014-09-05 17:49:11 +04:00
parent f07e81c4b9
commit 420af7a4dc
45 changed files with 1767 additions and 1144 deletions

View File

@@ -342,10 +342,10 @@ int CBEChannelWidget::exec(CMenuTarget* parent, const std::string & /*actionKey*
cancelMoveChannel();
}
}
else if (msg==CRCInput::RC_up || msg==(neutrino_msg_t)g_settings.key_channelList_pageup)
else if (msg==CRCInput::RC_up || msg==(neutrino_msg_t)g_settings.key_pageup)
{
if (!(Channels->empty())) {
int step = (msg == (neutrino_msg_t)g_settings.key_channelList_pageup) ? listmaxshow : 1; // browse or step 1
int step = (msg == (neutrino_msg_t)g_settings.key_pageup) ? listmaxshow : 1; // browse or step 1
int new_selected = selected - step;
if (new_selected < 0) {
@@ -357,10 +357,10 @@ int CBEChannelWidget::exec(CMenuTarget* parent, const std::string & /*actionKey*
updateSelection(new_selected);
}
}
else if (msg==CRCInput::RC_down || msg==(neutrino_msg_t)g_settings.key_channelList_pagedown)
else if (msg==CRCInput::RC_down || msg==(neutrino_msg_t)g_settings.key_pagedown)
{
if (!(Channels->empty())) {
int step = ((int) msg == g_settings.key_channelList_pagedown) ? listmaxshow : 1; // browse or step 1
int step = ((int) msg == g_settings.key_pagedown) ? listmaxshow : 1; // browse or step 1
int new_selected = selected + step;
if (new_selected >= (int) Channels->size()) {
if ((Channels->size() - listmaxshow -1 < selected) && (selected != (Channels->size() - 1)) && (step != 1))