CMovieBrowser: add missing context buttons

No user can see anything about available submenu and help window,
because access to help via submenu is not longer possible
since a394d17fb8


Origin commit data
------------------
Commit: bb895befef
Author: Thilo Graf <dbt@novatux.de>
Date: 2016-12-06 (Tue, 06 Dec 2016)
This commit is contained in:
2016-12-06 11:16:11 +01:00
parent fef2ade749
commit 0c5dd0ef44
2 changed files with 17 additions and 9 deletions

View File

@@ -263,6 +263,9 @@ CMovieBrowser::~CMovieBrowser()
if (m_movieCover)
delete m_movieCover;
if (m_header)
delete m_header; m_header = NULL;
}
void CMovieBrowser::clearListLines()
@@ -330,6 +333,7 @@ void CMovieBrowser::init(void)
m_pcInfo1 = NULL;
m_pcInfo2 = NULL;
m_pcFilter = NULL;
m_header = NULL;
m_windowFocus = MB_FOCUS_BROWSER;
m_textTitle = g_Locale->getText(LOCALE_MOVIEBROWSER_HEAD);
@@ -1069,10 +1073,11 @@ int CMovieBrowser::exec(const char* path)
void CMovieBrowser::hide(void)
{
//TRACE("[mb]->%s\n", __func__);
if (m_channelLogo)
{
delete m_channelLogo;
m_channelLogo = NULL;
if (m_channelLogo){
delete m_channelLogo; m_channelLogo = NULL;
}
if (m_header) {
delete m_header; m_header = NULL;
}
old_EpgId = 0;
framebuffer->paintBackground();
@@ -1313,7 +1318,7 @@ void CMovieBrowser::refreshChannelLogo(void)
int x = m_cBoxFrame.iX + m_cBoxFrameTitleRel.iX + m_cBoxFrameTitleRel.iWidth - m_channelLogo->getWidth() - OFFSET_INNER_MID;
int y = m_cBoxFrame.iY + m_cBoxFrameTitleRel.iY + (m_cBoxFrameTitleRel.iHeight - m_channelLogo->getHeight())/2;
m_channelLogo->setXPos(x - pb_hdd_offset);
m_channelLogo->setXPos(x - pb_hdd_offset - m_header->getContextBtnObject()->getWidth());
m_channelLogo->setYPos(y);
m_channelLogo->hide();
m_channelLogo->paint();
@@ -1543,7 +1548,7 @@ void CMovieBrowser::info_hdd_level(bool paint_hdd)
tmp_blocks_percent_used = blocks_percent_used;
const short pbw = 100;
const short border = m_cBoxFrameTitleRel.iHeight/4;
CProgressBar pb(m_cBoxFrame.iX+ m_cBoxFrameFootRel.iWidth - pbw - border, m_cBoxFrame.iY+m_cBoxFrameTitleRel.iY + border, pbw, m_cBoxFrameTitleRel.iHeight/2);
CProgressBar pb(m_cBoxFrame.iX+ m_cBoxFrameFootRel.iWidth - m_header->getContextBtnObject()->getWidth() - pbw - border, m_cBoxFrame.iY+m_cBoxFrameTitleRel.iY + border, pbw, m_cBoxFrameTitleRel.iHeight/2);
pb.setType(CProgressBar::PB_REDRIGHT);
pb.setValues(blocks_percent_used, 100);
pb.paint(false);
@@ -1830,9 +1835,11 @@ void CMovieBrowser::refreshTitle(void)
int w = m_cBoxFrameTitleRel.iWidth;
int h = m_cBoxFrameTitleRel.iHeight;
CComponentsHeader header(x, y, w, h, title.c_str(), icon);
header.paint(CC_SAVE_SCREEN_NO);
newHeader = header.isPainted();
if (!m_header){
m_header = new CComponentsHeader(x, y, w, h, title.c_str(), icon, CComponentsHeader::CC_BTN_HELP | CComponentsHeader::CC_BTN_MENU);
}
m_header->paint(CC_SAVE_SCREEN_NO);
newHeader = m_header->isPainted();
info_hdd_level(true);
}

View File

@@ -163,6 +163,7 @@ class CMovieBrowser : public CMenuTarget
CBox m_cBoxFrameFootRel;
CBox m_cBoxFrameTitleRel;
CComponentsHeader *m_header;
CComponentsDetailLine *m_detailsLine;
CComponentsChannelLogo *m_channelLogo;
CComponentsPicture *m_movieCover;