change RC_back handling; its not longer translated to RC_home

Origin commit data
------------------
Commit: b0c6332f44
Author: vanhofen <vanhofen@gmx.de>
Date: 2022-01-03 (Mon, 03 Jan 2022)

Origin message was:
------------------
- change RC_back handling; its not longer translated to RC_home
This commit is contained in:
vanhofen
2022-01-03 22:32:25 +01:00
parent 33066fb846
commit dfce6dd08f
43 changed files with 80 additions and 58 deletions

View File

@@ -254,6 +254,7 @@ int CColorChooser::exec(CMenuTarget *parent, const std::string &)
}
break;
}
case CRCInput::RC_back:
case CRCInput::RC_home:
{
if (((*value[VALUE_R] != r_alt) || (*value[VALUE_G] != g_alt) || (*value[VALUE_B] != b_alt) || ((value[VALUE_A]) && (*(value[VALUE_A]) != a_alt))) &&

View File

@@ -267,7 +267,7 @@ int CHintBox::exec()
{
res = messages_return::cancel_info;
}
else if(msg == CRCInput::RC_home)
else if (CNeutrinoApp::getInstance()->backKey(msg))
{
res = messages_return::cancel_all;
}

View File

@@ -543,7 +543,7 @@ int CKeyboardInput::exec(CMenuTarget* parent, const std::string &)
{
keyDigiPressed(msg);
}
else if ((msg == CRCInput::RC_home) || (msg == CRCInput::RC_timeout))
else if (CNeutrinoApp::getInstance()->backKey(msg) || (msg == CRCInput::RC_timeout))
{
if ((inputString->getValue() != oldval) &&
(ShowMsg(title, LOCALE_MESSAGEBOX_DISCARD, CMsgBox::mbrYes, CMsgBox::mbYes | CMsgBox::mbCancel) == CMsgBox::mbrCancel)) {

View File

@@ -168,8 +168,7 @@ int CListBox::exec(CMenuTarget* parent, const std::string & /*actionKey*/)
{
g_RCInput->getMsg(&msg, &data, g_settings.timing[SNeutrinoSettings::TIMING_EPG]);
if (( msg == (neutrino_msg_t)g_settings.key_channelList_cancel) ||
( msg == CRCInput::RC_home))
if ((msg == (neutrino_msg_t)g_settings.key_channelList_cancel) || CNeutrinoApp::getInstance()->backKey(msg))
{
loop = false;
}

View File

@@ -1085,6 +1085,7 @@ int CMenuWidget::exec(CMenuTarget* parent, const std::string &)
msg = CRCInput::RC_timeout;
break;
case (CRCInput::RC_back):
case (CRCInput::RC_home):
no_action = true;
msg = CRCInput::RC_timeout;

View File

@@ -172,6 +172,7 @@ void CMsgBox::initButtons()
btn.text = BTN_TEXT(mbNo);
btn.directKeys.clear();
btn.directKeys.push_back(CRCInput::RC_red);
btn.directKeys.push_back(CRCInput::RC_back);
btn.directKeys.push_back(CRCInput::RC_home);
btn.btn_result = mbrNo;
btn.btn_alias = mbNo;
@@ -191,6 +192,7 @@ void CMsgBox::initButtons()
btn.button = NEUTRINO_ICON_BUTTON_HOME;
btn.text = BTN_TEXT(mbCancel);
btn.directKeys.clear();
btn.directKeys.push_back(CRCInput::RC_back);
btn.directKeys.push_back(CRCInput::RC_home);
btn.directKeys.push_back(CRCInput::RC_setup);
btn.btn_result = mbrCancel;
@@ -201,6 +203,7 @@ void CMsgBox::initButtons()
btn.button = NEUTRINO_ICON_BUTTON_HOME;
btn.text = BTN_TEXT(mbBack);
btn.directKeys.clear();
btn.directKeys.push_back(CRCInput::RC_back);
btn.directKeys.push_back(CRCInput::RC_home);
btn.btn_result = mbrBack;
btn.btn_alias = mbBack;
@@ -220,6 +223,7 @@ void CMsgBox::initButtons()
btn.text = BTN_TEXT(mbNo);
btn.directKeys.clear();
btn.directKeys.push_back(CRCInput::RC_green);
btn.directKeys.push_back(CRCInput::RC_back);
btn.directKeys.push_back(CRCInput::RC_home);
btn.btn_result = mbrNo;
btn.btn_alias = mbNo;
@@ -347,8 +351,8 @@ int CMsgBox::exec()
result = (msg_result_t)ccw_footer->getSelectedButtonObject()->getButtonResult();
loop = false;
}
//***action button 'home' with general cancel result***
else if (msg == CRCInput::RC_home){
//***action button 'home' or 'back' with general cancel result***
else if (CNeutrinoApp::getInstance()->backKey(msg)) {
result = mbrCancel;
loop = false;
}

View File

@@ -290,7 +290,7 @@ void CShellWindow::showResult()
{
do
g_RCInput->getMsgAbsoluteTimeout(&msg, &data, &timeoutEnd);
while (msg != CRCInput::RC_ok && msg != CRCInput::RC_home && msg != CRCInput::RC_timeout);
while (msg != CRCInput::RC_ok && !CNeutrinoApp::getInstance()->backKey(msg) && msg != CRCInput::RC_timeout);
}
textBox->hide();
}

View File

@@ -486,7 +486,7 @@ int CStringInput::exec( CMenuTarget* parent, const std::string & )
{
loop=false;
}
else if ( (msg==CRCInput::RC_home) || (msg==CRCInput::RC_timeout) )
else if (CNeutrinoApp::getInstance()->backKey(msg) || (msg==CRCInput::RC_timeout))
{
std::string tmp_name = name == NONEXISTANT_LOCALE ? head : g_Locale->getText(name);
if ((trim (*valueString) != trim(oldval)) &&
@@ -825,7 +825,7 @@ int CPINInput::exec( CMenuTarget* parent, const std::string & )
res = menu_return::RETURN_EXIT;
loop=false;
}
else if ( (msg==CRCInput::RC_home) || (msg==CRCInput::RC_timeout) || (msg==CRCInput::RC_ok) )
else if (CNeutrinoApp::getInstance()->backKey(msg) || (msg==CRCInput::RC_timeout) || (msg==CRCInput::RC_ok))
{
loop=false;
}

View File

@@ -274,7 +274,7 @@ int CExtendedInput::exec( CMenuTarget* parent, const std::string & )
if(cancel != NULL)
*cancel = false;
}
else if ( (msg==CRCInput::RC_home) || (msg==CRCInput::RC_timeout) )
else if (CNeutrinoApp::getInstance()->backKey(msg) || (msg==CRCInput::RC_timeout))
{
if (trim (*valueString) != trim(oldval)){
int erg = ShowMsg(name, LOCALE_MESSAGEBOX_DISCARD, CMsgBox::mbrYes, CMsgBox::mbNo | CMsgBox::mbYes | CMsgBox::mbCancel);

View File

@@ -115,11 +115,11 @@ void CTermWindow::showResult()
if (!exit) {
do {
g_RCInput->getMsgAbsoluteTimeout(&msg, &data, &timeoutEnd);
if ( msg > CRCInput::RC_MaxRC && msg != CRCInput::RC_ok && msg != CRCInput::RC_home && msg != CRCInput::RC_timeout){
if ( msg > CRCInput::RC_MaxRC && msg != CRCInput::RC_ok && !CNeutrinoApp::getInstance()->backKey(msg) && msg != CRCInput::RC_timeout){
CNeutrinoApp::getInstance()->handleMsg( msg, data );
}
} while (msg != CRCInput::RC_ok && msg != CRCInput::RC_home && msg != CRCInput::RC_timeout);
} while (msg != CRCInput::RC_ok && !CNeutrinoApp::getInstance()->backKey(msg) && msg != CRCInput::RC_timeout);
}
frameBuffer->Clear();
}