static const int H_FOLDER_SIZE = 348;
AlbumListForm::AlbumListForm(void)
- : __itemCount(0)
+ : __isHWBackButtonExist(false)
+ , __itemCount(0)
, __pAlbumViewIconList(null)
, __pContextMenuMore(null)
+ , __pOptionMenu(null)
, __pPresentationModel(null)
+
{
AppLogDebug("ENTER");
AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
{
AppLogDebug("ENTER");
result r = E_SUCCESS;
+ GalleryApp* pApp = static_cast<GalleryApp*>(GalleryApp::GetInstance());
+
+ __isHWBackButtonExist = false;
+ __isHWBackButtonExist = pApp->IsHwKeySupported();
+ AppLogDebug("EXIT(%s)", GetErrorMessage(r));
+
__pPresentationModel = AlbumListPresentationModel::GetInstance();
__pPresentationModel->ClearThumbnailRequests();
pFooter->AddItem(itemCamera);
delete pBitmap1;
- ButtonItem footerMore;
- footerMore.Construct(BUTTON_ITEM_STYLE_ICON, IDA_FOOTER_MORE);
-
- Bitmap* pBitmapMore = ResourceManager::GetBitmapN(IDB_CONTROLBAR_MORE);
- Bitmap* pBitmapMoreDim = ResourceManager::GetBitmapN(IDB_CONTROLBAR_MORE_DISABLED);
- Bitmap* pBitmapMorePressed = ResourceManager::GetBitmapN(IDB_CONTROLBAR_MORE_PRESSED);
- if (pBitmapMore != null && pBitmapMoreDim != null && pBitmapMorePressed != null)
+ if( __isHWBackButtonExist == false )
{
- footerMore.SetIcon(BUTTON_ITEM_STATUS_NORMAL, pBitmapMore);
- footerMore.SetIcon(BUTTON_ITEM_STATUS_DISABLED, pBitmapMoreDim);
- footerMore.SetIcon(BUTTON_ITEM_STATUS_PRESSED, pBitmapMorePressed);
- }
+ ButtonItem footerMore;
+ footerMore.Construct(BUTTON_ITEM_STYLE_ICON, IDA_FOOTER_MORE);
- pFooter->SetButton(BUTTON_POSITION_LEFT, footerMore);
- delete pBitmapMore;
- delete pBitmapMoreDim;
- delete pBitmapMorePressed;
+ Bitmap* pBitmapMore = ResourceManager::GetBitmapN(IDB_CONTROLBAR_MORE);
+ Bitmap* pBitmapMoreDim = ResourceManager::GetBitmapN(IDB_CONTROLBAR_MORE_DISABLED);
+ Bitmap* pBitmapMorePressed = ResourceManager::GetBitmapN(IDB_CONTROLBAR_MORE_PRESSED);
- __pContextMenuMore = new (std::nothrow) ContextMenu();
- __pContextMenuMore->Construct(Point(0, 0), CONTEXT_MENU_STYLE_LIST);
- __pContextMenuMore->AddItem(ResourceManager::GetString(L"IDS_COM_HEADER_EDIT"), IDA_FOOTER_EDIT);
- __pContextMenuMore->SetShowState(false);
- __pContextMenuMore->AddActionEventListener(*this);
+ if (pBitmapMore != null && pBitmapMoreDim != null && pBitmapMorePressed != null)
+ {
+ footerMore.SetIcon(BUTTON_ITEM_STATUS_NORMAL, pBitmapMore);
+ footerMore.SetIcon(BUTTON_ITEM_STATUS_DISABLED, pBitmapMoreDim);
+ footerMore.SetIcon(BUTTON_ITEM_STATUS_PRESSED, pBitmapMorePressed);
+ }
+
+ pFooter->SetButton(BUTTON_POSITION_LEFT, footerMore);
+ delete pBitmapMore;
+ delete pBitmapMoreDim;
+ delete pBitmapMorePressed;
+
+ __pContextMenuMore = new (std::nothrow) ContextMenu();
+ __pContextMenuMore->Construct(Point(0, 0), CONTEXT_MENU_STYLE_LIST);
+ __pContextMenuMore->AddItem(ResourceManager::GetString(L"IDS_COM_HEADER_EDIT"), IDA_FOOTER_EDIT);
+ __pContextMenuMore->SetShowState(false);
+ __pContextMenuMore->AddActionEventListener(*this);
+ }
+ else
+ {
+ __pOptionMenu = new (std::nothrow) OptionMenu();
+ __pOptionMenu->Construct();
+ __pOptionMenu->AddItem(ResourceManager::GetString(L"IDS_COM_HEADER_EDIT"),IDA_FOOTER_EDIT);
+ __pOptionMenu->AddItem(ResourceManager::GetString(L"IDS_COM_HEADER_EDIT"), IDA_FOOTER_EDIT);
+ __pOptionMenu->SetShowState(false);
+ __pOptionMenu->AddActionEventListener(*this);
+ SetFormMenuEventListener(this);
+ }
SetFormBackEventListener(this);
}
__pContextMenuMore->SetShowState(false);
}
+ if ( __pOptionMenu != null && __pOptionMenu ->GetShowState() == true)
+ {
+ __pOptionMenu->SetShowState(false);
+ __pOptionMenu->Show();
+ }
+
if (__pPresentationModel->GetAppControlMode() == APPCONTROL_MODE_PICK)
{
if (__pPresentationModel->GetAppControlMediaType() == APPCONTROL_MEDIA_TYPE_IMAGE)
return r;
}
+
+void
+AlbumListForm::OnFormMenuRequested (Tizen::Ui::Controls::Form &source)
+{
+
+ if ( __pOptionMenu == null )
+ {
+ return ;
+ }
+
+ __pOptionMenu->SetShowState(true);
+ __pOptionMenu->Show();
+
+}
, __pContextMenuShare(null)
, __pContextEditorMenuMove(null)
, __pContextSelectionMenuMove(null)
+ , __pOptionMenu(null)
, __pDeletePopup(null)
, __morePosition(Point(0, 0))
, __pContentDirectoryList(null)
, __pPopUp(null)
, __pFileMove(null)
, __isCopyOperation(false)
+ , __isHWBackButtonExist(false)
, __pPresentationModel(null)
{
AppLogDebug("ENTER");
AddControl(__pPopUp);
}
+ GalleryApp* pApp = static_cast<GalleryApp*>(GalleryApp::GetInstance());
+ __isHWBackButtonExist = pApp->IsHwKeySupported();
+
+ SetFormMenuEventListener(this);
__pPresentationModel = FileListPresentationModel::GetInstance();
__pPresentationModel->ClearThumbnailRequests();
{
pFooter->SetStyle(FOOTER_STYLE_BUTTON_ICON_TEXT);
- ButtonItem footerMore;
- footerMore.Construct(BUTTON_ITEM_STYLE_ICON, IDA_FOOTER_MORE);
- Bitmap* pBitmapMore = ResourceManager::GetBitmapN(IDB_CONTROLBAR_MORE);
- Bitmap* pBitmapMoreDim = ResourceManager::GetBitmapN(IDB_CONTROLBAR_MORE_DISABLED);
- Bitmap* pBitmapMorePressed = ResourceManager::GetBitmapN(IDB_CONTROLBAR_MORE_PRESSED);
-
- if (pBitmapMore != null && pBitmapMoreDim != NULL && pBitmapMorePressed != null)
+ if (__isHWBackButtonExist == false)
{
- footerMore.SetIcon(BUTTON_ITEM_STATUS_NORMAL, pBitmapMore);
- footerMore.SetIcon(BUTTON_ITEM_STATUS_DISABLED, pBitmapMoreDim);
- footerMore.SetIcon(BUTTON_ITEM_STATUS_PRESSED, pBitmapMorePressed);
- }
- pFooter->SetButton(BUTTON_POSITION_LEFT,footerMore);
+ ButtonItem footerMore;
+ footerMore.Construct(BUTTON_ITEM_STYLE_ICON, IDA_FOOTER_MORE);
+ Bitmap* pBitmapMore = ResourceManager::GetBitmapN(IDB_CONTROLBAR_MORE);
+ Bitmap* pBitmapMoreDim = ResourceManager::GetBitmapN(IDB_CONTROLBAR_MORE_DISABLED);
+ Bitmap* pBitmapMorePressed = ResourceManager::GetBitmapN(IDB_CONTROLBAR_MORE_PRESSED);
- delete pBitmapMore;
- delete pBitmapMoreDim;
- delete pBitmapMorePressed;
+ if (pBitmapMore != null && pBitmapMoreDim != NULL && pBitmapMorePressed != null)
+ {
+ footerMore.SetIcon(BUTTON_ITEM_STATUS_NORMAL, pBitmapMore);
+ footerMore.SetIcon(BUTTON_ITEM_STATUS_DISABLED, pBitmapMoreDim);
+ footerMore.SetIcon(BUTTON_ITEM_STATUS_PRESSED, pBitmapMorePressed);
+ }
+ pFooter->SetButton(BUTTON_POSITION_LEFT,footerMore);
+
+ delete pBitmapMore;
+ delete pBitmapMoreDim;
+ delete pBitmapMorePressed;
+ }
FooterItem footerShare;
r = footerShare.Construct(IDA_FOOTER_SHARE);
AppLogDebug("GetItemCheckedCount(%d)", checkedCount);
- if (__pContextMenuMore != null)
+ if (__isHWBackButtonExist == false)
{
- delete __pContextMenuMore;
- __pContextMenuMore = null;
- }
+ if (__pContextMenuMore != null)
+ {
+ delete __pContextMenuMore;
+ __pContextMenuMore = null;
+ }
- __pContextMenuMore = new (std::nothrow) ContextMenu();
- __pContextMenuMore->Construct(Point(0, 0), CONTEXT_MENU_STYLE_LIST);
+ __pContextMenuMore = new (std::nothrow) ContextMenu();
+ __pContextMenuMore->Construct(Point(0, 0), CONTEXT_MENU_STYLE_LIST);
- __pContextMenuMore->AddItem(ResourceManager::GetString(L"IDS_COM_BODY_MOVE"),
- IDA_CONTEXT_MENU_MORE_MOVE);
- __pContextMenuMore->AddItem(ResourceManager::GetString(L"IDS_COM_BODY_COPY"),
- IDA_CONTEXT_MENU_MORE_COPY);
+ __pContextMenuMore->AddItem(ResourceManager::GetString(L"IDS_COM_BODY_MOVE"),
+ IDA_CONTEXT_MENU_MORE_MOVE);
+ __pContextMenuMore->AddItem(ResourceManager::GetString(L"IDS_COM_BODY_COPY"),
+ IDA_CONTEXT_MENU_MORE_COPY);
+
+ if (checkedCount > 1)
+ {
+ __pContextMenuMore->AddItem(ResourceManager::GetString(L"IDS_MEDIABR_OPT_SLIDESHOW"),
+ IDA_CONTEXT_MENU_MORE_SLIDE_SHOW);
+ }
+
+ __pContextMenuMore->AddItem(ResourceManager::GetString(L"IDS_IV_OPT_ROTATE_LEFT"),IDA_CONTEXT_MENU_ROTATE_LEFT);
+ __pContextMenuMore->AddItem(ResourceManager::GetString(L"IDS_IV_OPT_ROTATE_RIGHT"),IDA_CONTEXT_MENU_ROTATE_RIGHT);
+
+ __pContextMenuMore->SetShowState(false);
+ __pContextMenuMore->AddActionEventListener(*this);
+
+ __pContextEditorMenuMove = new (std::nothrow) ContextMenu();
+ __pContextEditorMenuMove->Construct(Point(0, 0), CONTEXT_MENU_STYLE_LIST);
+ __pContextEditorMenuMove->AddActionEventListener(*this);
+
+ __pContextSelectionMenuMove = new (std::nothrow) ContextMenu();
+ __pContextSelectionMenuMove->Construct(Point(0, 0), CONTEXT_MENU_STYLE_LIST);
+ __pContextSelectionMenuMove->AddActionEventListener(*this);
- if (checkedCount > 1)
- {
- __pContextMenuMore->AddItem(ResourceManager::GetString(L"IDS_MEDIABR_OPT_SLIDESHOW"),
- IDA_CONTEXT_MENU_MORE_SLIDE_SHOW);
}
+ else
+ {
- __pContextMenuMore->AddItem(ResourceManager::GetString(L"IDS_IV_OPT_ROTATE_LEFT"),IDA_CONTEXT_MENU_ROTATE_LEFT);
- __pContextMenuMore->AddItem(ResourceManager::GetString(L"IDS_IV_OPT_ROTATE_RIGHT"),IDA_CONTEXT_MENU_ROTATE_RIGHT);
+ if (__pOptionMenu != null)
+ {
+ delete __pOptionMenu;
+ __pOptionMenu = null;
+ }
- __pContextMenuMore->SetShowState(false);
- __pContextMenuMore->AddActionEventListener(*this);
+ __pOptionMenu = new (std::nothrow) OptionMenu();
+ __pOptionMenu->Construct();
+ __pOptionMenu->AddItem(ResourceManager::GetString(L"IDS_COM_BODY_MOVE"),
+ IDA_CONTEXT_MENU_MORE_MOVE);
+ __pOptionMenu->AddItem(ResourceManager::GetString(L"IDS_COM_BODY_COPY"),
+ IDA_CONTEXT_MENU_MORE_COPY);
+
+ if (checkedCount > 1)
+ {
+ __pOptionMenu->AddItem(ResourceManager::GetString(L"IDS_MEDIABR_OPT_SLIDESHOW"),
+ IDA_CONTEXT_MENU_MORE_SLIDE_SHOW);
+ }
+
+ __pOptionMenu->AddItem(ResourceManager::GetString(L"IDS_IV_OPT_ROTATE_LEFT"),IDA_CONTEXT_MENU_ROTATE_LEFT);
+ __pOptionMenu->AddItem(ResourceManager::GetString(L"IDS_IV_OPT_ROTATE_RIGHT"),IDA_CONTEXT_MENU_ROTATE_RIGHT);
+
+ __pOptionMenu->AddActionEventListener(*this);
+
+ }
__pContextMenuShare = new (std::nothrow) ContextMenu();
__pContextMenuShare->Construct(Point(0, 0), CONTEXT_MENU_STYLE_LIST);
__pContextMenuShare->SetShowState(false);
__pContextMenuShare->AddActionEventListener(*this);
- __pContextEditorMenuMove = new (std::nothrow) ContextMenu();
- __pContextEditorMenuMove->Construct(Point(0, 0), CONTEXT_MENU_STYLE_LIST);
- __pContextEditorMenuMove->AddActionEventListener(*this);
- __pContextSelectionMenuMove = new (std::nothrow) ContextMenu();
- __pContextSelectionMenuMove->Construct(Point(0, 0), CONTEXT_MENU_STYLE_LIST);
- __pContextSelectionMenuMove->AddActionEventListener(*this);
if (__pContentDirectoryNameList != null)
{
__isCopyOperation = true;
}
RefreshFolderList();
- if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_EDITOR)
+
+ if ( __isHWBackButtonExist == false )
{
- if (__pContextEditorMenuMove->GetShowState() == false)
+
+ if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_EDITOR)
{
- __pContextEditorMenuMove->SetAnchorPosition(Point(__morePosition.x, __morePosition.y - 48));
- __pContextEditorMenuMove->SetShowState(true);
- __pContextEditorMenuMove->Show();
+ if (__pContextEditorMenuMove->GetShowState() == false)
+ {
+ __pContextEditorMenuMove->SetAnchorPosition(Point(__morePosition.x, __morePosition.y - 48));
+ __pContextEditorMenuMove->SetShowState(true);
+ __pContextEditorMenuMove->Show();
+ }
+ else
+ {
+ __pContextEditorMenuMove->SetShowState(false);
+ }
}
- else
+ else if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_SELECTION)
{
- __pContextEditorMenuMove->SetShowState(false);
+ if (__pContextSelectionMenuMove->GetShowState() == false)
+ {
+ __pContextSelectionMenuMove->SetAnchorPosition(__morePosition);
+ __pContextSelectionMenuMove->SetShowState(true);
+ __pContextSelectionMenuMove->Show();
+ }
+ else
+ {
+ __pContextSelectionMenuMove->SetShowState(false);
+ }
}
}
- else if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_SELECTION)
+ else
{
- if (__pContextSelectionMenuMove->GetShowState() == false)
- {
- __pContextSelectionMenuMove->SetAnchorPosition(__morePosition);
- __pContextSelectionMenuMove->SetShowState(true);
- __pContextSelectionMenuMove->Show();
- }
- else
- {
- __pContextSelectionMenuMove->SetShowState(false);
- }
+ __pOptionMenu->SetShowState(true);
+ __pOptionMenu->Show();
}
+
}
break;
}
}
- }
- break;
-
- case IDA_CONTEXTMENU_SELECTION_MOVE_CREATE_ALBUM:
- {
- if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_SELECTION)
+ else
{
- AllListSelectionPanel* pSelectionPanel = dynamic_cast<AllListSelectionPanel*>
- (pSceneManager->GetCurrentScene()->GetPanel());
-
- if (pSelectionPanel != null)
+ if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_SELECTION)
{
- IList* pList = pSelectionPanel->GetItemCheckedIndexListN();
- pList->InsertAt(new (std::nothrow) Integer(ALBUM_CREATE), ALBUM_FIRST_ELEMENT);
- if (__isCopyOperation)
- {
- pList->InsertAt(new (std::nothrow) Integer(FILE_ACTION_COPY), ALBUM_SECOND_ELEMENT);
- }
- else
+ AllListSelectionPanel* pSelectionPanel = dynamic_cast<AllListSelectionPanel*>
+ (pSceneManager->GetCurrentScene()->GetPanel());
+
+ if (pSelectionPanel != null)
{
- pList->InsertAt(new (std::nothrow) Integer(FILE_ACTION_MOVE), ALBUM_SECOND_ELEMENT);
+ IList* pList = pSelectionPanel->GetItemCheckedIndexListN();
+ pList->InsertAt(new (std::nothrow) Integer(ALBUM_CREATE), ALBUM_FIRST_ELEMENT);
+ if (__isCopyOperation)
+ {
+ pList->InsertAt(new (std::nothrow) Integer(FILE_ACTION_COPY), ALBUM_SECOND_ELEMENT);
+ }
+ else
+ {
+ pList->InsertAt(new (std::nothrow) Integer(FILE_ACTION_MOVE), ALBUM_SECOND_ELEMENT);
+ }
+ pSceneManager->GoForward(ForwardSceneTransition(IDSCN_ALBUM_NAME_EDITOR), pList);
}
- pSceneManager->GoForward(ForwardSceneTransition(IDSCN_ALBUM_NAME_EDITOR), pList);
}
}
}
else if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_SELECTION)
{
if ((IDA_CONTEXTMENU_SELECTION_MOVE_ALBUM_ARRAY_START <= actionId) &&
- (actionId <= IDA_CONTEXTMENU_SELECTION_MOVE_CREATE_ALBUM + 1000))
+ (actionId <= IDA_CONTEXTMENU_EDITOR_MOVE_CREATE_ALBUM + 1000))
{
if (__pContentDirectoryList == null)
{
__pContentDirectoryNameList->Add(pDirName);
}
}
- __pContextEditorMenuMove->RemoveAllItems();
- __pContextEditorMenuMove->AddItem(ResourceManager::GetString(L"IDS_MEDIABR_OPT_CREATE_ALBUM"),
- IDA_CONTEXTMENU_EDITOR_MOVE_CREATE_ALBUM);
- __pContextSelectionMenuMove->RemoveAllItems();
- __pContextSelectionMenuMove->AddItem(ResourceManager::GetString(L"IDS_MEDIABR_OPT_CREATE_ALBUM"),
- IDA_CONTEXTMENU_SELECTION_MOVE_CREATE_ALBUM);
-
- loopCount = __pContentDirectoryNameList->GetCount();
- for (int i = 0; i < loopCount; ++i)
+
+ if (__isHWBackButtonExist == false)
+ {
+ __pContextEditorMenuMove->RemoveAllItems();
+ __pContextEditorMenuMove->AddItem(ResourceManager::GetString(L"IDS_MEDIABR_OPT_CREATE_ALBUM"),
+ IDA_CONTEXTMENU_EDITOR_MOVE_CREATE_ALBUM);
+ __pContextSelectionMenuMove->RemoveAllItems();
+ __pContextSelectionMenuMove->AddItem(ResourceManager::GetString(L"IDS_MEDIABR_OPT_CREATE_ALBUM"),
+ IDA_CONTEXTMENU_EDITOR_MOVE_CREATE_ALBUM);
+
+ loopCount = __pContentDirectoryNameList->GetCount();
+ for (int i = 0; i < loopCount; ++i)
+ {
+ pDirName = static_cast<String*>(__pContentDirectoryNameList->GetAt(i));
+
+ if ( *pDirName != __pPresentationModel->GetCurrentAlbumName())
+ {
+ __pContextEditorMenuMove->AddItem(*(new (std::nothrow) String(*pDirName)),
+ IDA_CONTEXTMENU_EDITOR_MOVE_ALBUM_ARRAY_START + i);
+ __pContextSelectionMenuMove->AddItem(*(new (std::nothrow) String(*pDirName)),
+ IDA_CONTEXTMENU_SELECTION_MOVE_ALBUM_ARRAY_START + i);
+ }
+ }
+ __pContextEditorMenuMove->SetShowState(false);
+ __pContextSelectionMenuMove->SetShowState(false);
+ }
+ else
{
- pDirName = static_cast<String*>(__pContentDirectoryNameList->GetAt(i));
+ __pOptionMenu->RemoveAllItems();
+ __pOptionMenu->AddItem(ResourceManager::GetString(L"IDS_MEDIABR_OPT_CREATE_ALBUM"),
+ IDA_CONTEXTMENU_EDITOR_MOVE_CREATE_ALBUM);
- if ( *pDirName != __pPresentationModel->GetCurrentAlbumName())
+ loopCount = __pContentDirectoryNameList->GetCount();
+ for (int i = 0; i < loopCount; ++i)
{
- __pContextEditorMenuMove->AddItem(*(new (std::nothrow) String(*pDirName)),
- IDA_CONTEXTMENU_EDITOR_MOVE_ALBUM_ARRAY_START + i);
- __pContextSelectionMenuMove->AddItem(*(new (std::nothrow) String(*pDirName)),
- IDA_CONTEXTMENU_SELECTION_MOVE_ALBUM_ARRAY_START + i);
+ pDirName = static_cast<String*>(__pContentDirectoryNameList->GetAt(i));
+
+ if ( *pDirName != __pPresentationModel->GetCurrentAlbumName())
+ {
+ __pOptionMenu->AddItem(*(new (std::nothrow) String(*pDirName)),
+ IDA_CONTEXTMENU_EDITOR_MOVE_ALBUM_ARRAY_START + i);
+ }
}
+
}
- __pContextEditorMenuMove->SetShowState(false);
- __pContextSelectionMenuMove->SetShowState(false);
AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
}
AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
}
+void
+FileListEditorForm::OnFormMenuRequested (Tizen::Ui::Controls::Form &source)
+{
+
+ SceneManager* pSceneManager = SceneManager::GetInstance();
+ int checkedCount = 0;
+
+ if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_EDITOR)
+ {
+ AllListEditorPanel* pEditorPanel = dynamic_cast<AllListEditorPanel*>(pSceneManager->GetCurrentScene()->GetPanel());
+ if (pEditorPanel != null)
+ {
+ checkedCount = pEditorPanel->GetItemCheckedCount();
+ }
+ }
+ else if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_SELECTION)
+ {
+ AllListSelectionPanel* pSelectionPanel = dynamic_cast<AllListSelectionPanel*>(pSceneManager->GetCurrentScene()->GetPanel());
+ if (pSelectionPanel != null)
+ {
+ checkedCount = pSelectionPanel->GetItemCheckedCount();
+ }
+ }
+
+ if (__pContextMenuShare != null && __pContextMenuShare->GetShowState() == true )
+ {
+ __pContextMenuShare->SetShowState(false);
+ }
+
+ if ( checkedCount > 0)
+ {
+ if ( __pOptionMenu == null )
+ {
+ return ;
+ }
+
+ __pOptionMenu->RemoveAllItems();
+ __pOptionMenu->AddItem(ResourceManager::GetString(L"IDS_COM_BODY_MOVE"),
+ IDA_CONTEXT_MENU_MORE_MOVE);
+ __pOptionMenu->AddItem(ResourceManager::GetString(L"IDS_COM_BODY_COPY"),
+ IDA_CONTEXT_MENU_MORE_COPY);
+
+ if (checkedCount > 1)
+ {
+ __pOptionMenu->AddItem(ResourceManager::GetString(L"IDS_MEDIABR_OPT_SLIDESHOW"),
+ IDA_CONTEXT_MENU_MORE_SLIDE_SHOW);
+ }
+
+ __pOptionMenu->AddItem(ResourceManager::GetString(L"IDS_IV_OPT_ROTATE_LEFT"),IDA_CONTEXT_MENU_ROTATE_LEFT);
+ __pOptionMenu->AddItem(ResourceManager::GetString(L"IDS_IV_OPT_ROTATE_RIGHT"),IDA_CONTEXT_MENU_ROTATE_RIGHT);
+
+ __pOptionMenu->SetShowState(true);
+ __pOptionMenu->Show();
+
+ }
+}
#include "GlAllListPanel.h"
#include "GlFileListForm.h"
#include "GlFileListPresentationModel.h"
+#include "GlGalleryApp.h"
#include "GlResourceManager.h"
#include "GlSlideSettingListener.h"
#include "GlSlideShowPopUp.h"
using namespace Tizen::Content;
FileListForm::FileListForm(void)
- : __pContextMenuMore(null)
+ : __isHWBackButtonExist(false)
+ , __pContextMenuMore(null)
+ , __pOptionMenu(null)
, __pPopUp(null)
, __pPresentationModel(null)
{
Header* pHeader = GetHeader();
TryReturn(pHeader != null, E_FAILURE, "[%s] fail to get the Header.", GetErrorMessage(GetLastResult()));
+ __isHWBackButtonExist = false;
+
+ SetFormMenuEventListener(this);
+ GalleryApp* pApp = static_cast<GalleryApp*>(GalleryApp::GetInstance());
+
+ __isHWBackButtonExist = pApp->IsHwKeySupported();
+
__pPresentationModel = FileListPresentationModel::GetInstance();
__pPresentationModel->ClearThumbnailRequests();
delete __pContextMenuMore;
__pContextMenuMore = null;
}
+
+ if ( __pOptionMenu != null )
+ {
+ delete __pOptionMenu;
+ __pOptionMenu = null;
+ }
+
AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
return E_SUCCESS;
pFooter->RemoveAllItems();
pFooter->SetStyle(FOOTER_STYLE_BUTTON_ICON);
- ButtonItem footerMore;
- footerMore.Construct(BUTTON_ITEM_STYLE_ICON, IDA_FOOTER_MORE);
- Bitmap* pBitmapMore = ResourceManager::GetBitmapN(IDB_CONTROLBAR_MORE);
- Bitmap* pBitmapMoreDim = ResourceManager::GetBitmapN(IDB_CONTROLBAR_MORE_DISABLED);
- Bitmap* pBitmapMorePressed = ResourceManager::GetBitmapN(IDB_CONTROLBAR_MORE_PRESSED);
-
- if (pBitmapMore != null && pBitmapMoreDim != null && pBitmapMorePressed != null)
+ if ( __isHWBackButtonExist == false )
{
- footerMore.SetIcon(BUTTON_ITEM_STATUS_NORMAL, pBitmapMore);
- footerMore.SetIcon(BUTTON_ITEM_STATUS_DISABLED, pBitmapMoreDim);
- footerMore.SetIcon(BUTTON_ITEM_STATUS_PRESSED, pBitmapMorePressed);
- }
- pFooter->SetButton(BUTTON_POSITION_LEFT, footerMore);
+ ButtonItem footerMore;
+ footerMore.Construct(BUTTON_ITEM_STYLE_ICON, IDA_FOOTER_MORE);
+ Bitmap* pBitmapMore = ResourceManager::GetBitmapN(IDB_CONTROLBAR_MORE);
+ Bitmap* pBitmapMoreDim = ResourceManager::GetBitmapN(IDB_CONTROLBAR_MORE_DISABLED);
+ Bitmap* pBitmapMorePressed = ResourceManager::GetBitmapN(IDB_CONTROLBAR_MORE_PRESSED);
- delete pBitmapMore;
- delete pBitmapMoreDim;
- delete pBitmapMorePressed;
+ if (pBitmapMore != null && pBitmapMoreDim != null && pBitmapMorePressed != null)
+ {
+ footerMore.SetIcon(BUTTON_ITEM_STATUS_NORMAL, pBitmapMore);
+ footerMore.SetIcon(BUTTON_ITEM_STATUS_DISABLED, pBitmapMoreDim);
+ footerMore.SetIcon(BUTTON_ITEM_STATUS_PRESSED, pBitmapMorePressed);
+ }
+ pFooter->SetButton(BUTTON_POSITION_LEFT, footerMore);
+
+ delete pBitmapMore;
+ delete pBitmapMoreDim;
+ delete pBitmapMorePressed;
+ }
FooterItem itemCamera;
itemCamera.Construct(IDA_FOOTER_CAMERA);
}
pFooter->AddItem(itemCamera);
- if (__pContextMenuMore != null)
+ if ( __isHWBackButtonExist == false )
{
- delete __pContextMenuMore;
- __pContextMenuMore = null;
- }
- __pContextMenuMore = new (std::nothrow) ContextMenu();
- __pContextMenuMore->Construct(Point(0, 0), CONTEXT_MENU_STYLE_LIST);
+ if (__pContextMenuMore != null)
+ {
+ delete __pContextMenuMore;
+ __pContextMenuMore = null;
+ }
- if (__pPresentationModel->GetCurrentAlbumContentInfoCount() > 1)
- {
- __pContextMenuMore->AddItem(ResourceManager::GetString(L"IDS_MEDIABR_OPT_SLIDESHOW"), IDA_FOOTER_SLIDESHOW);
- }
+ __pContextMenuMore = new (std::nothrow) ContextMenu();
+ __pContextMenuMore->Construct(Point(0, 0), CONTEXT_MENU_STYLE_LIST);
- if (__pPresentationModel->GetCurrentAlbumContentInfoCount() == 0)
- {
- __pContextMenuMore->SetEnabled(false);
+ if (__pPresentationModel->GetCurrentAlbumContentInfoCount() > 1)
+ {
+ __pContextMenuMore->AddItem(ResourceManager::GetString(L"IDS_MEDIABR_OPT_SLIDESHOW"), IDA_FOOTER_SLIDESHOW);
+ }
+
+ if (__pPresentationModel->GetCurrentAlbumContentInfoCount() == 0)
+ {
+ __pContextMenuMore->SetEnabled(false);
+ }
+ else
+ {
+ __pContextMenuMore->AddItem(ResourceManager::GetString(L"IDS_COM_HEADER_EDIT"), IDA_FOOTER_EDIT);
+ __pContextMenuMore->SetShowState(false);
+ __pContextMenuMore->AddActionEventListener(*this);
+ }
}
else
{
- __pContextMenuMore->AddItem(ResourceManager::GetString(L"IDS_COM_HEADER_EDIT"), IDA_FOOTER_EDIT);
- __pContextMenuMore->SetShowState(false);
- __pContextMenuMore->AddActionEventListener(*this);
- }
+ if (__pOptionMenu != null)
+ {
+ delete __pOptionMenu;
+ __pOptionMenu = null;
+ }
+
+ __pOptionMenu = new (std::nothrow) OptionMenu();
+ __pOptionMenu->Construct();
+
+ if (__pPresentationModel->GetCurrentAlbumContentInfoCount() > 1)
+ {
+ __pOptionMenu->AddItem(ResourceManager::GetString(L"IDS_MEDIABR_OPT_SLIDESHOW"), IDA_FOOTER_SLIDESHOW);
+ }
+
+ if (__pPresentationModel->GetCurrentAlbumContentInfoCount() == 0)
+ {
+ __pOptionMenu->SetEnabled(false);
+ }
+ else
+ {
+ __pOptionMenu->AddItem(ResourceManager::GetString(L"IDS_COM_HEADER_EDIT"), IDA_FOOTER_EDIT);
+ __pOptionMenu->AddActionEventListener(*this);
+ }
+ }
pFooter->SetBackButton();
pFooter->AddActionEventListener(*this);
GetFooter()->SetButtonEnabled(BUTTON_POSITION_LEFT,state);
GetFooter()->Invalidate(true);
}
+
+void
+FileListForm::OnFormMenuRequested (Tizen::Ui::Controls::Form &source)
+{
+
+ InitializeFooter();
+
+ if ( __pOptionMenu == null )
+ {
+ return ;
+ }
+
+ __pOptionMenu->Show();
+ __pOptionMenu->SetShowState(true);
+
+}