, __modalMsgBoxResult(0)
, __textLength(0)
, __mountState(false)
+ , __isCreateAlbum(false)
+ , __isKeyPadOpen(false)
, __albumNameEditorMode(ALBUM_NAME_EDITOR_MODE_RENAME)
, __pMessageBox(null)
, __pMoveIndexList(null)
, __fileActionMode(FILE_ACTION_MOVE)
, __pFileMove(null)
- , __pProgressAnim(null)
, __pPresentationModel(null)
, __pFilePresentationModel(null)
{
AppLogDebug("ENTER");
_overlayMsg = false;
+ _pProgressAnim = null;
AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
}
AlbumNameEditorForm::~AlbumNameEditorForm(void)
{
AppLogDebug("ENTER");
- DeviceManager::RemoveDeviceEventListener(DEVICE_TYPE_STORAGE_CARD, *this);
delete __pFileMove;
AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
}
SetOrientation(ORIENTATION_AUTOMATIC);
AddOrientationEventListener(*this);
- DeviceManager::AddDeviceEventListener(DEVICE_TYPE_STORAGE_CARD, *this);
Header* pHeader = GetHeader();
pHeader->SetStyle(HEADER_STYLE_TITLE);
__pNameEditField->AddTextEventListener(*this);
__pNameEditField->SetColor(EDIT_STATUS_NORMAL, COLOR_NAME_EDIT_FIELD);
__pNameEditField->SetOverlayKeypadCommandButtonVisible(false);
+ __pNameEditField->AddKeypadEventListener(*this);
__pNameEditField->AddActionEventListener(*this);
return E_SUCCESS;
byteCountForInput = __pNameEditField->GetText();
r = utf8.GetByteCount(byteCountForInput, inputLength);
- if (inputLength >= tempLength)
+ if ( inputLength == tempLength )
+ {
+ String msg = ResourceManager::GetString(L"IDS_COM_POP_MAXIMUM_NUMBER_OF_CHARACTERS_REACHED");
+ CreateMessage(msg);
+ __pNameEditField->ShowKeypad();
+ return;
+ }
+ else if (inputLength > tempLength)
{
String maxCharacterString;
String currentInputCharacter;
//Add a popup here
Rectangle clientRect = Form::GetBounds();
Rectangle rect(0, 0, clientRect.width, clientRect.height);
- __pProgressAnim = new (std::nothrow) ProgressAnimation;
- __pProgressAnim->Construct(rect);
- AddControl(__pProgressAnim);
- __pProgressAnim->SetShowState(true);
+ _pProgressAnim = new (std::nothrow) ProgressAnimation;
+ _pProgressAnim->Construct(rect);
+ AddControl(_pProgressAnim);
+ _pProgressAnim->SetShowState(true);
GetFooter()->SetEnabled(false);
- __pProgressAnim->AnimationStart();
- __pProgressAnim->Draw();
+ _pProgressAnim->AnimationStart();
+ _pProgressAnim->Draw();
_overlayMsg = true;
}
}
void
+AlbumNameEditorForm::ShowAnimation()
+{
+ Rectangle clientRect= GetClientAreaBounds();
+ Rectangle rect(0, 0, clientRect.width, clientRect.height);
+ _pProgressAnim = new (std::nothrow) ProgressAnimation;
+ _pProgressAnim->Construct(rect);
+ AddControl(_pProgressAnim);
+ _pProgressAnim->SetShowState(true);
+ GetFooter()->SetEnabled(false);
+ _pProgressAnim->AnimationStart();
+ _pProgressAnim->Draw();
+ _overlayMsg = true;
+}
+
+void
+AlbumNameEditorForm::StopAnimation(void)
+{
+ if (_pProgressAnim)
+ {
+ _pProgressAnim->AnimationStop();
+ _pProgressAnim->SetShowState(false);
+ RemoveControl(_pProgressAnim);
+ GetFooter()->SetEnabled(true);
+ _pProgressAnim = null;
+ _overlayMsg = false;
+ }
+}
+
+void
AlbumNameEditorForm::OnCreateAlbum(void)
{
String path;
- __pNameEditField->HideKeypad();
- __pNameEditField->RequestRedraw();
path.Append(Tizen::System::Environment::GetMediaPath());
path.Append(__nameEditFieldText);
}
delete __pFileMove;
- GetMoveFileIndexList(path, __pMoveIndexList, __pFilePresentationModel);
__pFileMove = new (std::nothrow) FileMoveTimer(path, __pMoveIndexList, __pFilePresentationModel, this);
if (__fileActionMode == FILE_ACTION_COPY)
{
__pNameEditField->SetText(__nameEditFieldPreText);
__pNameEditField->HideKeypad();
__pNameEditField->Draw();
+
+ String msg = ResourceManager::GetString(L"IDS_COM_BODY_OPERATION_FAILED");
+ CreateMessage(msg);
AppLogDebug("MoveToContentFileList content failed (%s)", GetErrorMessage(r));
SceneManager* pSceneManager = SceneManager::GetInstance();
pSceneManager->GoBackward(BackwardSceneTransition(__callerSceneId));
}
}
-void AlbumNameEditorForm::OnAlbumRenameComplete(void)
+void
+AlbumNameEditorForm::OnAlbumRenameComplete(void)
{
//Hide popup here..
- __pProgressAnim->AnimationStop();
- __pProgressAnim->SetShowState(false);
- RemoveControl(__pProgressAnim);
+ _pProgressAnim->AnimationStop();
+ _pProgressAnim->SetShowState(false);
+ RemoveControl(_pProgressAnim);
_overlayMsg = false;
GetFooter()->SetEnabled(true);
SceneManager* pSceneManager = SceneManager::GetInstance();
case IDA_BUTTON_CREATE_NAME_SAVE:
{
__pNameEditField->SetEnabled(false);
+ __isCreateAlbum = false;
GetFooter()->SetItemEnabled(0, false);
if (__albumNameEditorMode == ALBUM_NAME_EDITOR_MODE_CREATE)
{
- OnCreateAlbum();
+ if (__isKeyPadOpen == true )
+ {
+ __pNameEditField->HideKeypad();
+ __isCreateAlbum = true;
+ }
+ else
+ {
+ OnCreateAlbum();
+ }
+
}
else if (__albumNameEditorMode == ALBUM_NAME_EDITOR_MODE_RENAME)
{
AlbumNameEditorForm::OnFormBackRequested(Form& source)
{
AppLogDebug("ENTER");
- if (__pProgressAnim != null)
+ if (_pProgressAnim != null)
{
- if (__pProgressAnim->GetShowState())
+ if (_pProgressAnim->GetShowState())
{
return;
}
__pPresentationModel = AlbumListPresentationModel::GetInstance();
__previousSceneId = previousSceneId;
- __pNameEditField->SetEnabled(true);
+ DeviceManager::AddDeviceEventListener(DEVICE_TYPE_STORAGE_CARD, *this);
__pPresentationModel->AddContentEventListener(this);
if (pArgs != null)
const SceneId& nextSceneId)
{
AppLogDebug("ENTER");
+
+ if(__pNameEditField->IsEnabled() == false)
+ {
+ __pNameEditField->SetEnabled(true);
+ }
+
+ __isKeyPadOpen = false;
+
__pPresentationModel->RemoveContentEventListener(*this);
+ DeviceManager::RemoveDeviceEventListener(DEVICE_TYPE_STORAGE_CARD, *this);
+
AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
}
if (__mountState == false)
{
+ if (__pFileMove && __pFileMove->IsStarted())
+ {
+ __pFileMove->Cancel();
+ delete __pFileMove;
+ __pFileMove = null;
+ }
+
SceneManager* pSceneManager = SceneManager::GetInstance();
pSceneManager->GoForward(ForwardSceneTransition(IDSCN_ALBUM_LIST));
AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
void
AlbumNameEditorForm::OnOrientationChanged(const Tizen::Ui::Control &source, Tizen::Ui::OrientationStatus orientationStatus)
{
- if (__pProgressAnim != null)
+ if (_pProgressAnim != null)
+ {
+ _pProgressAnim->ChangeOrientation(Form::GetBounds());
+ _pProgressAnim->Invalidate(true);
+ }
+}
+
+void
+AlbumNameEditorForm::OnKeypadClosed(Tizen::Ui::Control& source)
+{
+ AppLogDebug("ENTER");
+
+ if ( __isCreateAlbum == true)
{
- __pProgressAnim->ChangeOrientation(Form::GetBounds());
- __pProgressAnim->Invalidate(true);
+ OnCreateAlbum();
+ __isCreateAlbum = false;
}
+ __isKeyPadOpen = false;
+ AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
+}
+
+void
+AlbumNameEditorForm::OnKeypadOpened(Tizen::Ui::Control& source)
+{
+ AppLogDebug("ENTER");
+ __isKeyPadOpen = true;
+ AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
}