gui/widget/stringinput: sms-input: cleanup last push, no binary change

add timer to change to next field


Origin commit data
------------------
Commit: 365f3ea395
Author: martii <m4rtii@gmx.de>
Date: 2013-12-12 (Thu, 12 Dec 2013)
This commit is contained in:
martii
2013-12-12 08:24:24 +01:00
committed by vanhofen
parent 14078ea2e0
commit 532de067ed
2 changed files with 13 additions and 0 deletions

View File

@@ -133,6 +133,8 @@ CStringInput::~CStringInput()
if(head) {
free(head);
}
g_RCInput->killTimer (smstimer);
}
#define CStringInputSMSButtonsCount 2
@@ -196,6 +198,7 @@ void CStringInput::init()
x = getScreenStartX(width);
y = getScreenStartY(height);
selected = 0;
smstimer = 0;
}
void CStringInput::NormalKeyPressed(const neutrino_msg_t key)
@@ -423,6 +426,12 @@ int CStringInput::exec( CMenuTarget* parent, const std::string & )
if ( msg <= CRCInput::RC_MaxRC )
timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_MENU] == 0 ? 0xFFFF : g_settings.timing[SNeutrinoSettings::TIMING_MENU]);
if ((msg == NeutrinoMessages::EVT_TIMER) && (data == smstimer))
msg = CRCInput::RC_right;
if (msg < CRCInput::RC_nokey)
g_RCInput->killTimer (smstimer);
if (msg==CRCInput::RC_left)
{
keyLeftPressed();
@@ -717,6 +726,8 @@ void CStringInputSMS::NormalKeyPressed(const neutrino_msg_t key)
value[selected] = Chars[numericvalue][keyCounter];
last_digit = numericvalue;
paintChar(selected);
g_RCInput->killTimer (smstimer);
smstimer = g_RCInput->addTimer(2*1000*1000);
}
else
{