From b309cea18c575649b604d782bb7a2767c2db6b72 Mon Sep 17 00:00:00 2001 From: "ravi.n2" Date: Tue, 23 Apr 2013 18:22:22 +0530 Subject: [PATCH] Rename Changes Change-Id: If0ff95e60efe96fb2713e2ecfcc94fac145d5cd0 --- src/MfCreateFolderForm.cpp | 28 +++++++++++----------------- 1 file changed, 11 insertions(+), 17 deletions(-) diff --git a/src/MfCreateFolderForm.cpp b/src/MfCreateFolderForm.cpp index bc0ff3e..b3dbb68 100644 --- a/src/MfCreateFolderForm.cpp +++ b/src/MfCreateFolderForm.cpp @@ -788,21 +788,18 @@ CreateFolderForm::OnTextValueChanged(const Tizen::Ui::Control& source) tempLength = ID_FILE_NAME_LENGTH_MAX; } - textToCheck = __pEditFieldFolderName->GetText().GetLength() - __textLength; - r = currentText.SubString(__pEditFieldFolderName->GetCursorPosition() - textToCheck,currentInput); - for(int i = 0 ; i < currentInput.GetLength() ; i++) + currentInput = __pEditFieldFolderName->GetText(); + + if(currentInput.Contains(specialCharacters[0])) { - if(specialCharacters.Contains(currentInput[i])) - { - String invalidCharacterString; - AppResource::GetInstance()->GetString(L"IDS_COM_POP_INVALID_CHARACTERS", invalidCharacterString); - messageBox.Construct(L"", invalidCharacterString, MSGBOX_STYLE_NONE, ID_MESSAGE_BOX_TIMEOUT_ONE_SECOND); - messageBox.ShowAndWait(modalResult); - currentText.Remove(__pEditFieldFolderName->GetCursorPosition()-textToCheck,textToCheck); - __pEditFieldFolderName->SetText(currentText); - __pEditFieldFolderName->SetFocus(); - break; - } + String invalidCharacterString; + AppResource::GetInstance()->GetString(L"IDS_COM_POP_INVALID_CHARACTERS", invalidCharacterString); + messageBox.Construct(L"", invalidCharacterString, MSGBOX_STYLE_NONE, ID_MESSAGE_BOX_TIMEOUT_ONE_SECOND); + messageBox.ShowAndWait(modalResult); + r = currentInput.Replace("/",""); + __pEditFieldFolderName->SetText(currentInput); + __pEditFieldFolderName->SetFocus(); + AppLogDebug("result is %s",GetErrorMessage(r)); } inputLength = byteCount; @@ -839,9 +836,6 @@ CreateFolderForm::OnTextValueChanged(const Tizen::Ui::Control& source) __pEditFieldFolderName->ShowKeypad(); return; } - - r = utf8.GetByteCount(__pEditFieldFolderName->GetText(), byteCount); - __textLength = byteCount; } return; } -- 2.7.4