using namespace Tizen::Content;
FileListForm::FileListForm(void)
- : __pOptionMenu(null)
+ : __menuState(true)
+ , __pOptionMenu(null)
, __pPopUp(null)
, __pPresentationModel(null)
{
FileListForm::~FileListForm(void)
{
AppLogDebug("ENTER");
+
+ if ( __pPopUp != NULL )
+ {
+ delete __pPopUp;
+ __pPopUp = NULL;
+ }
+
+
AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
}
InitializeFooter();
SetFormBackEventListener(this);
+ SetOrientation(ORIENTATION_AUTOMATIC);
+ AddOrientationEventListener(*this);
AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
return E_SUCCESS;
pDataList->Construct();
pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_CAMERA_ALLOW_SWITCH), new (std::nothrow) String(APPCONTROL_DATA_TRUE));
__pPresentationModel->StartAppControl(APPCONTROL_PROVIDER_ID_CAMERA, APPCONTROL_OPERATION_ID_CREATE_CONTENT,
- null, new (std::nothrow) String(APPCONTROL_MIME_IMAGE_JPG), pDataList, null);
+ null, new (std::nothrow) String(APPCONTROL_MIME_IMAGE_JPG), pDataList, this);
}
break;
AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
}
+void
+FileListForm::OnOrientationChanged(const Tizen::Ui::Control &source, Tizen::Ui::OrientationStatus orientationStatus)
+{
+
+
+ SceneManager* pSceneManager = SceneManager::GetInstance();
+ pSceneManager->GetCurrentScene();
+
+ if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST)
+ {
+ AllListPanel* pListPanel = dynamic_cast<AllListPanel*>(pSceneManager->GetCurrentScene()->GetPanel());
+ if (pListPanel != null)
+ {
+ pListPanel->ChangeOrientation();
+ }
+ }
+}
+
result
FileListForm::InitializeFooter(void)
{
pFooter->RemoveAllItems();
pFooter->SetStyle(FOOTER_STYLE_BUTTON_ICON);
- pFooter->SetMenuButton();
- pFooter->SetBackButton();
FooterItem itemCamera;
itemCamera.Construct(IDA_FOOTER_CAMERA);
}
pFooter->AddItem(itemCamera);
+ delete pBitmapCamera;
if (__pOptionMenu != null)
{
}
void
-FileListForm::SetFooterState(bool state)
+FileListForm::SetMenuState(bool state)
{
- GetFooter()->SetMenuButtonEnabled(state);
- GetFooter()->Invalidate(true);
+ __menuState = state;
}
void
FileListForm::OnFormMenuRequested (Tizen::Ui::Controls::Form &source)
{
- InitializeFooter();
-
- if ( __pOptionMenu == null )
+ if (__menuState == true )
{
- return ;
+ InitializeFooter();
+
+ if ( __pOptionMenu == null )
+ {
+ return ;
+ }
+
+ __pOptionMenu->SetShowState(true);
+ __pOptionMenu->Show();
}
- __pOptionMenu->SetShowState(true);
- __pOptionMenu->Show();
+}
+
+void
+FileListForm::OnAppControlCompleteResponseReceived(const AppId& appId, const Tizen::Base::String& operationId,
+ AppCtrlResult appControlResult, const Tizen::Base::Collection::IMap* pExtraData)
+{
+ AppLogDebug("OnAppControlCompleteResponseReceived : %d", appControlResult);
+ GalleryApp* pGalleryApp = static_cast<GalleryApp*>(GalleryApp::GetInstance());
+ TryReturnVoid(pGalleryApp != null, "pGalleryApp is null");
+ pGalleryApp->SetFrameEnabled(true);
}