static const int H_FOLDER_SIZE = 348;
AlbumListForm::AlbumListForm(void)
- : __isHWBackButtonExist(false)
- , __itemCount(0)
+ : __itemCount(0)
, __pAlbumViewIconList(null)
- , __pContextMenuMore(null)
, __pOptionMenu(null)
, __pPresentationModel(null)
{
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->SetStyle(FOOTER_STYLE_BUTTON_ICON);
pFooter->SetBackButton();
+ pFooter->SetMenuButton();
pFooter->RemoveAllItems();
FooterItem itemCamera;
pFooter->AddItem(itemCamera);
delete pBitmap1;
-
- if( __isHWBackButtonExist == false )
- {
- 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)
- {
- 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->SetShowState(false);
- __pOptionMenu->AddActionEventListener(*this);
- SetFormMenuEventListener(this);
- }
-
+ __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);
}
+
pFooter->AddActionEventListener(*this);
AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
}
break;
- case IDA_FOOTER_MORE:
- {
- if (__pContextMenuMore->GetShowState() == false && __pPresentationModel->GetFolderCount() != 0)
- {
- Rectangle rect = source.GetBounds();
- __pContextMenuMore->SetAnchorPosition(Point(rect.width/10, rect.y));
- __pContextMenuMore->SetShowState(true);
- __pContextMenuMore->Show();
- }
- else
- {
- __pContextMenuMore->SetShowState(false);
- }
- }
- break;
-
default:
break;
}
if ( __itemCount == 0 )
{
- GetFooter()->SetButtonEnabled(BUTTON_POSITION_LEFT, false);
+ GetFooter()->SetMenuButtonEnabled(false);
}
else
{
- GetFooter()->SetButtonEnabled(BUTTON_POSITION_LEFT, true);
+ GetFooter()->SetMenuButtonEnabled(true);
}
if (__pAlbumViewIconList != null)
{
AppLogDebug("ENTER");
- if(__pContextMenuMore != null && __pContextMenuMore ->GetShowState() == true)
- {
- __pContextMenuMore->SetShowState(false);
- }
-
if ( __pOptionMenu != null && __pOptionMenu ->GetShowState() == true)
{
__pOptionMenu->SetShowState(false);
if (__itemCount == 0 )
{
- GetFooter()->SetButtonEnabled(BUTTON_POSITION_LEFT, false);
+ GetFooter()->SetMenuButtonEnabled(false);
}
else
{
- GetFooter()->SetButtonEnabled(BUTTON_POSITION_LEFT, true);
+ GetFooter()->SetMenuButtonEnabled(true);
}
GetFooter()->Invalidate(true);