Nabi Issue (N_SE-36034, N_SE-36081, N_SE-36083) fix
authorRakesh Gajjar <rakesh.2206@samsung.com>
Wed, 24 Apr 2013 10:29:58 +0000 (15:59 +0530)
committerRakesh Gajjar <rakesh.2206@samsung.com>
Wed, 24 Apr 2013 10:29:58 +0000 (15:59 +0530)
Change-Id: I758791fe376e14e5c0cfce0ecdb8379df98d74b8

inc/MfSearchForm.h
src/MfCreateFolderForm.cpp
src/MfSearchForm.cpp

index 1848192..a2db420 100644 (file)
@@ -93,7 +93,8 @@ public:
        void OnKeypadClosed(Tizen::Ui::Control& source);\r
        void OnKeypadOpened(Tizen::Ui::Control& source);\r
        void OnKeypadWillOpen(Tizen::Ui::Control& source);\r
-\r
+       void OnKeypadBoundsChanged(Tizen::Ui::Control& source);\r
+       \r
        //ITextEventListener\r
        void OnTextValueChangeCanceled(const Tizen::Ui::Control& source);\r
        void OnTextValueChanged(const Tizen::Ui::Control& source);\r
index b3dbb68..63ab358 100644 (file)
@@ -271,7 +271,7 @@ CreateFolderForm::OnActionPerformed(const Tizen::Ui::Control& source, int action
                        if (__pEditFieldFolderName != null)
                        {
                                folderName.Append(__pEditFieldFolderName->GetText());
-                               folderName.Trim();
+                               //folderName.Trim();
                                AppLogDebug("folder value is %ls",folderName.GetPointer());
                                __rootPath = FolderNavigationPresentationModel::GetCurrentPath();
 
@@ -364,7 +364,7 @@ CreateFolderForm::OnActionPerformed(const Tizen::Ui::Control& source, int action
                        if (__pEditFieldFolderName != null)
                        {
                                __fileName = __pEditFieldFolderName->GetText();
-                               __fileName.Trim();
+                               //__fileName.Trim();
                        }
                        String OriginalName = __pDirectory->GetFileName();
 
@@ -788,18 +788,21 @@ CreateFolderForm::OnTextValueChanged(const Tizen::Ui::Control& source)
                        tempLength = ID_FILE_NAME_LENGTH_MAX;
                }
 
-               currentInput = __pEditFieldFolderName->GetText();
-
-               if(currentInput.Contains(specialCharacters[0]))
+               textToCheck =  __pEditFieldFolderName->GetText().GetLength() - __textLength;
+               r = currentText.SubString(__pEditFieldFolderName->GetCursorPosition() - textToCheck,currentInput);
+               for(int i = 0 ; i < currentInput.GetLength() ; 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);
-                       r = currentInput.Replace("/","");
-                       __pEditFieldFolderName->SetText(currentInput);
-                       __pEditFieldFolderName->SetFocus();
-                       AppLogDebug("result is %s",GetErrorMessage(r));
+                       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;
+                       }
                }
 
                inputLength = byteCount;
@@ -836,6 +839,9 @@ CreateFolderForm::OnTextValueChanged(const Tizen::Ui::Control& source)
                        __pEditFieldFolderName->ShowKeypad();
                        return;
                }
+
+               r = utf8.GetByteCount(__pEditFieldFolderName->GetText(), byteCount);
+               __textLength = byteCount;
        }
        return;
 }
@@ -1269,7 +1275,7 @@ CreateFolderForm::OnNotificationReceived(Tizen::Base::Collection::ArrayList* pAr
                if (pSceneManager != null)
                {
                        String fileName = __pEditFieldFolderName->GetText();
-                       fileName.Trim();
+                       //fileName.Trim();
                        if(__pDirectory != null)
                        {
                                __pDirectory->SetFileName(fileName);
index caca5a9..bbd44f8 100644 (file)
@@ -1837,3 +1837,10 @@ SearchForm::OnAppControlCompleted(void)
        }
        AppLogDebug("OnAppControlCompleted--");
 }
+
+void
+SearchForm::OnKeypadBoundsChanged(Tizen::Ui::Control& source)
+{
+       __pSearchBar->SetContentAreaSize(Dimension(GetClientAreaBounds().width, GetClientAreaBounds().height - H_SEARCH_BAR));
+       __pListView->SetSize(Dimension(GetClientAreaBounds().width, GetClientAreaBounds().height - H_SEARCH_BAR));
+}