#include "GlAlbumInfo.h"
#include "GlAlbumListEditorForm.h"
#include "GlAlbumListPresentationModel.h"
+#include "GlProgressAnimation.h"
#include "GlResourceManager.h"
#include "GlTypes.h"
static const String RESERVED_MEDIA_PATH = Environment::GetMediaPath();
static const String RESERVED_EXTERNAL_MEDIA_PATH = Environment::GetExternalStoragePath();
-static const int GAP_W_POPUP_ITEM = 5;
-static const int W_DELETE_POPUP = 620;
-static const int H_DELETE_POPUP = 300;
-static const int H_DELETE_LABEL = 180;
-static const int Y_DELETE_BUTTON = 180;
-static const int H_DELETE_BUTTON = 80;
+static const int GAP_W_POPUP_ITEM = 10;
+static const int W_DELETE_POPUP = 688;
+static const int H_DELETE_POPUP = 230;
+static const int H_DELETE_LABEL = 80;
+static const int Y_DELETE_BUTTON = 132;
+static const int H_DELETE_BUTTON = 74;
+static const int W_DELETE_BUTTON = 318;
+static const int Y_DELETE_LABEL = 32;
static const int FORMAT_BUFFER_SIZE = 256;
, __pDeletePopup(null)
, __pFileUpdateTimer(null)
, __pPresentationModel(null)
+ , __isScanProgress(false)
{
AppLogDebug("ENTER");
+ _pProgressAnim = null;
AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
}
}
void
+AlbumListEditorForm::ShowAnimation(void)
+{
+ Rectangle clientRect= GetClientAreaBounds();
+ Rectangle rect(0, 0, clientRect.width, clientRect.height);
+ _pProgressAnim = new (std::nothrow) ProgressAnimation;
+ _pProgressAnim->Construct(rect);
+ AddControl(_pProgressAnim);
+ SetControlAlwaysOnTop(*_pProgressAnim,true);
+ _pProgressAnim->SetShowState(true);
+ GetFooter()->SetEnabled(false);
+ _pProgressAnim->AnimationStart();
+ _pProgressAnim->Draw();
+}
+void
+AlbumListEditorForm::StopAnimation(void)
+{
+ if (_pProgressAnim)
+ {
+ _pProgressAnim->AnimationStop();
+ _pProgressAnim->SetShowState(false);
+ RemoveControl(_pProgressAnim);
+ GetFooter()->SetEnabled(true);
+ _pProgressAnim = null;
+ }
+}
+
+void
AlbumListEditorForm::OnContentUpdated(void)
{
AppLogDebug("ENTER");
Rectangle popupClientBounds = __pDeletePopup->GetClientAreaBounds();
Label* pLabel = new (std::nothrow) Label();
- pLabel->Construct(Rectangle(0, 0, popupClientBounds.width, H_DELETE_LABEL),
+ pLabel->Construct(Rectangle(0, Y_DELETE_LABEL, popupClientBounds.width, H_DELETE_LABEL),
ResourceManager::GetString(L"IDS_COM_POP_DELETE_Q"));
pLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
pLabel->SetTextConfig(34,LABEL_TEXT_STYLE_BOLD);
Button* pDeleteButton = new (std::nothrow) Button();
- pDeleteButton->Construct(Rectangle(popupClientBounds.width / 2 + GAP_W_POPUP_ITEM, Y_DELETE_BUTTON, popupClientBounds.width / 2 - GAP_W_POPUP_ITEM -10, H_DELETE_BUTTON),
+ pDeleteButton->Construct(Rectangle(popupClientBounds.width / 2 + GAP_W_POPUP_ITEM, Y_DELETE_BUTTON, W_DELETE_BUTTON, H_DELETE_BUTTON),
ResourceManager::GetString(L"IDS_COM_BODY_DELETE"));
pDeleteButton->SetColor(BUTTON_STATUS_NORMAL, COLOR_DELETE_BUTTON_NORMAL);
pDeleteButton->SetColor(BUTTON_STATUS_PRESSED, COLOR_DELETE_BUTTON_PRESSED);
pDeleteButton->AddActionEventListener(*this);
Button* pCancelButton = new (std::nothrow) Button();
- pCancelButton->Construct(Rectangle(10, Y_DELETE_BUTTON, popupClientBounds.width / 2 - GAP_W_POPUP_ITEM -10, H_DELETE_BUTTON),
+ pCancelButton->Construct(Rectangle(16, Y_DELETE_BUTTON, W_DELETE_BUTTON, H_DELETE_BUTTON),
ResourceManager::GetString(L"IDS_COM_POP_CANCEL"));
pCancelButton->SetActionId(IDA_DELETE_POPUP_CANCEL);
pCancelButton->AddActionEventListener(*this);
}
void
+AlbumListEditorForm::OnFormMenuRequested (Tizen::Ui::Controls::Form &source)
+{
+ if(__isScanProgress)
+ {
+ return;
+ }
+}
+
+void
AlbumListEditorForm::OnFormBackRequested(Form& source)
{
AppLogDebug("ENTER");
+ if(__isScanProgress)
+ {
+ return;
+ }
SceneManager* pSceneManager = SceneManager::GetInstance();
pSceneManager->GoForward(ForwardSceneTransition(IDSCN_ALBUM_LIST));
AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
}
-void AlbumListEditorForm::OnFileOpInvalidate(enum FileActionMode actionId)
+void
+AlbumListEditorForm::OnFileOpInvalidate(enum FileActionMode actionId)
{
Invalidate(true);
}
-void AlbumListEditorForm::OnFileOpComplete(enum FileActionMode actionId, enum FileActionCompleteRes res)
+void
+AlbumListEditorForm::OnScanDirStart()
+{
+ AppLogDebug("SANTHOSH ENTER");
+ GetHeader()->SetButtonEnabled(BUTTON_POSITION_RIGHT, false);
+ Invalidate(true);
+ __isScanProgress = true;
+ AppLogDebug("SANTHOSH EXIT");
+}
+void
+AlbumListEditorForm::OnScanDirComplete()
+{
+ AppLogDebug("SANTHOSH ENTER");
+ GetHeader()->SetButtonEnabled(BUTTON_POSITION_RIGHT, true);
+ Invalidate(true);
+ __isScanProgress = false;
+ AppLogDebug("SANTHOSH EXIT");
+}
+
+void
+AlbumListEditorForm::OnFileOpComplete(enum FileActionMode actionId, enum FileActionCompleteRes res)
{
AppLogDebug("ENTER");
__pPresentationModel->SetUpdateProgressStatus(false);
AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
}
-bool AlbumListEditorForm::OnKeyReleased(Control& source, const Tizen::Ui::KeyEventInfo& keyEventInfo)
+bool
+AlbumListEditorForm::OnKeyReleased(Control& source, const Tizen::Ui::KeyEventInfo& keyEventInfo)
{
AppLogDebug("ENTER");
__pEditorFolderIconList->SetItemChecked(index, true);
__pEditorFolderIconList->RefreshList(index, LIST_REFRESH_TYPE_ITEM_MODIFY);
}
+
+ if (_pProgressAnim != null)
+ {
+ _pProgressAnim->ChangeOrientation(Form::GetBounds());
+ _pProgressAnim->Invalidate(true);
+ }
}