diff --git a/src/gui/widget/stringinput.cpp b/src/gui/widget/stringinput.cpp index 59a5e8be8..de4dc5ac8 100644 --- a/src/gui/widget/stringinput.cpp +++ b/src/gui/widget/stringinput.cpp @@ -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 { diff --git a/src/gui/widget/stringinput.h b/src/gui/widget/stringinput.h index 47d5d692a..c7391dad3 100644 --- a/src/gui/widget/stringinput.h +++ b/src/gui/widget/stringinput.h @@ -51,6 +51,8 @@ class CStringInput : public CMenuTarget int lower_bound; int upper_bound; + uint32_t smstimer; + char * head; neutrino_locale_t name; neutrino_locale_t hint_1, hint_2;