mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-30 00:41:17 +02:00
gui/widget/stringinput: sms-input: cleanup last push, no binary change
add timer to change to next field
This commit is contained in:
@@ -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
|
||||
{
|
||||
|
@@ -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;
|
||||
|
Reference in New Issue
Block a user