Removed the deprecated Menu and Back buuton api
[apps/osp/Gallery.git] / src / GlAlbumNameEditorForm.cpp
index d0c97cb..4da5a0a 100644 (file)
@@ -101,9 +101,6 @@ AlbumNameEditorForm::OnInitializing(void)
 
        pHeader->SetStyle(HEADER_STYLE_TITLE);
 
-       GetFooter()->SetBackButtonEnabled(true);
-       GetFooter()->SetBackButton();
-
        FooterItem itemSave;
        itemSave.Construct(IDA_BUTTON_CREATE_NAME_SAVE);
        itemSave.SetText(ResourceManager::GetString(L"IDS_COM_OPT_SAVE"));
@@ -240,7 +237,11 @@ AlbumNameEditorForm::OnTextValueChanged(const Control& source)
                                }
                                AppLogDebug("result of byte count is %s",GetErrorMessage(r));
                                checkByteCount = checkByteCount + byteCount;
-                               lengthOfFinalString++;
+
+                               if( checkByteCount < tempLength)
+                               {
+                                       lengthOfFinalString++;
+                               }
                        }
 
                        r = __pNameEditField->GetText().SubString(0, lengthOfFinalString, currentInput);
@@ -441,6 +442,8 @@ AlbumNameEditorForm::OnActionPerformed(const Control& source, int actionId)
        {
        case IDA_BUTTON_CREATE_NAME_SAVE:
        {
+               __pNameEditField->SetEnabled(false);
+
                if (__albumNameEditorMode == ALBUM_NAME_EDITOR_MODE_CREATE)
                {
                        OnCreateAlbum();
@@ -492,6 +495,7 @@ AlbumNameEditorForm::OnSceneActivatedN(const SceneId& previousSceneId,
        __pPresentationModel = AlbumListPresentationModel::GetInstance();
        __previousSceneId = previousSceneId;
 
+       __pNameEditField->SetEnabled(true);
        __pPresentationModel->AddContentEventListener(this);
 
        if (pArgs != null)