From b0789c4be937f9087cc28d2301bf013cca1cc8bc Mon Sep 17 00:00:00 2001 From: Saravana Balaji Date: Mon, 15 Apr 2013 11:27:42 +0530 Subject: [PATCH] Tokenize on comma and colon and bug fixes Change-Id: Icc9a72a4206964145331e1d1ee1954c8114f818d Signed-off-by: Saravana Balaji --- src/ui/controls/FUiCtrl_TokenEditPresenter.cpp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/ui/controls/FUiCtrl_TokenEditPresenter.cpp b/src/ui/controls/FUiCtrl_TokenEditPresenter.cpp index 0086b36..3cb96c4 100755 --- a/src/ui/controls/FUiCtrl_TokenEditPresenter.cpp +++ b/src/ui/controls/FUiCtrl_TokenEditPresenter.cpp @@ -2843,7 +2843,9 @@ _TokenEditPresenter::OnTextCommitted(const String& commitText) { result r = E_SUCCESS; char enterText[2] = {'\n', }; - if (commitText == enterText) + String enterTextComma(","); + String enterTextColon(":"); + if ((commitText == enterText) || (commitText == enterTextComma) || (commitText == enterTextColon)) { CoreKeypadAction keypadaction = GetKeypadAction(); __pTokenEdit->SendKeypadEvent(keypadaction, CORE_KEYPAD_EVENT_STATUS_ENTERACTION); @@ -2940,10 +2942,13 @@ _TokenEditPresenter::OnTextCommitted(const String& commitText) InitializeTokenVisibilityAt(i); } - SetCursorDisabled(true); - __pTokenEdit->Draw(); - SetCursorDisabled(false); - StartCursorTimer(); + if (__pressedTokenIndex < 0) + { + SetCursorDisabled(true); + __pTokenEdit->Draw(); + SetCursorDisabled(false); + StartCursorTimer(); + } return; } -- 2.7.4