mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-30 08:51:10 +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) {
|
if(head) {
|
||||||
free(head);
|
free(head);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
g_RCInput->killTimer (smstimer);
|
||||||
}
|
}
|
||||||
|
|
||||||
#define CStringInputSMSButtonsCount 2
|
#define CStringInputSMSButtonsCount 2
|
||||||
@@ -196,6 +198,7 @@ void CStringInput::init()
|
|||||||
x = getScreenStartX(width);
|
x = getScreenStartX(width);
|
||||||
y = getScreenStartY(height);
|
y = getScreenStartY(height);
|
||||||
selected = 0;
|
selected = 0;
|
||||||
|
smstimer = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CStringInput::NormalKeyPressed(const neutrino_msg_t key)
|
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 )
|
if ( msg <= CRCInput::RC_MaxRC )
|
||||||
timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_MENU] == 0 ? 0xFFFF : g_settings.timing[SNeutrinoSettings::TIMING_MENU]);
|
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)
|
if (msg==CRCInput::RC_left)
|
||||||
{
|
{
|
||||||
keyLeftPressed();
|
keyLeftPressed();
|
||||||
@@ -717,6 +726,8 @@ void CStringInputSMS::NormalKeyPressed(const neutrino_msg_t key)
|
|||||||
value[selected] = Chars[numericvalue][keyCounter];
|
value[selected] = Chars[numericvalue][keyCounter];
|
||||||
last_digit = numericvalue;
|
last_digit = numericvalue;
|
||||||
paintChar(selected);
|
paintChar(selected);
|
||||||
|
g_RCInput->killTimer (smstimer);
|
||||||
|
smstimer = g_RCInput->addTimer(2*1000*1000);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@@ -51,6 +51,8 @@ class CStringInput : public CMenuTarget
|
|||||||
int lower_bound;
|
int lower_bound;
|
||||||
int upper_bound;
|
int upper_bound;
|
||||||
|
|
||||||
|
uint32_t smstimer;
|
||||||
|
|
||||||
char * head;
|
char * head;
|
||||||
neutrino_locale_t name;
|
neutrino_locale_t name;
|
||||||
neutrino_locale_t hint_1, hint_2;
|
neutrino_locale_t hint_1, hint_2;
|
||||||
|
Reference in New Issue
Block a user