gui/moviebrowser.cpp: prevent title and movie info frame refresh after play stop;

remove movie thumbnail on RC_favorites key;
align thumbnail width on apollo for hw blit
This commit is contained in:
[CST] Focus
2014-04-21 13:57:41 +04:00
parent b127646b43
commit fd49c36a7b

View File

@@ -1027,6 +1027,8 @@ int CMovieBrowser::exec(const char* path)
//refreshMovieInfo(); //refreshMovieInfo();
refreshTitle(); refreshTitle();
refreshFoot();
refreshLCD();
onSetGUIWindow(m_settings.gui); onSetGUIWindow(m_settings.gui);
bool loop = true; bool loop = true;
@@ -1143,11 +1145,7 @@ void CMovieBrowser::hide(void)
m_pcLastRecord = NULL; m_pcLastRecord = NULL;
} }
if (m_pcInfo != NULL) delete m_pcInfo; if (m_pcInfo != NULL) delete m_pcInfo;
//if (m_pcWindow != NULL) delete m_pcWindow;
//m_pcWindow = NULL;
m_pcInfo = NULL; m_pcInfo = NULL;
} }
int CMovieBrowser::paint(void) int CMovieBrowser::paint(void)
@@ -1194,7 +1192,7 @@ int CMovieBrowser::paint(void)
//refreshTitle(); //refreshTitle();
//refreshFoot(); //refreshFoot();
//refreshLCD(); //refreshLCD();
refresh(); //refresh();
return (true); return (true);
} }
@@ -1271,12 +1269,8 @@ void CMovieBrowser::refreshMovieInfo(void)
m_pcInfo->setText(&emptytext); m_pcInfo->setText(&emptytext);
} }
else { else {
bool logo_ok = false; printf("CMovieBrowser::refreshMovieInfo\n");
int picw = (int)(((float)16 / (float)9) * (float)m_cBoxFrameInfo.iHeight);
int pich = m_cBoxFrameInfo.iHeight;
std::string fname; std::string fname;
printf("CMovieBrowser::refreshMovieInfo\n");
if (show_mode == MB_SHOW_YT) { if (show_mode == MB_SHOW_YT) {
fname = m_movieSelectionHandler->tfile; fname = m_movieSelectionHandler->tfile;
} else { } else {
@@ -1287,11 +1281,17 @@ printf("CMovieBrowser::refreshMovieInfo\n");
fname = getScreenshotName(cover); fname = getScreenshotName(cover);
} }
} }
logo_ok = (!fname.empty()); bool logo_ok = (!fname.empty());
int flogo_w = 0, flogo_h = 0; int flogo_w = 0, flogo_h = 0;
if(logo_ok) { if(logo_ok) {
int picw = (int)(((float)16 / (float)9) * (float)m_cBoxFrameInfo.iHeight);
int pich = m_cBoxFrameInfo.iHeight;
g_PicViewer->getSize(fname.c_str(), &flogo_w, &flogo_h); g_PicViewer->getSize(fname.c_str(), &flogo_w, &flogo_h);
g_PicViewer->rescaleImageDimensions(&flogo_w, &flogo_h, picw-2, pich-2); g_PicViewer->rescaleImageDimensions(&flogo_w, &flogo_h, picw-2, pich-2);
#ifdef BOXMODEL_APOLLO
/* align for hw blit */
flogo_w = ((flogo_w + 3) / 4) * 4;
#endif
} }
m_pcInfo->setText(&m_movieSelectionHandler->epgInfo2, logo_ok ? m_cBoxFrameInfo.iWidth-flogo_w-20 : 0); m_pcInfo->setText(&m_movieSelectionHandler->epgInfo2, logo_ok ? m_cBoxFrameInfo.iWidth-flogo_w-20 : 0);
@@ -1937,7 +1937,7 @@ bool CMovieBrowser::onButtonPressMainFrame(neutrino_msg_t msg)
} }
} }
} }
} else if (msg == CRCInput::RC_topleft) { } else if (msg == CRCInput::RC_favorites) {
if (m_movieSelectionHandler != NULL) { if (m_movieSelectionHandler != NULL) {
if(ShowMsg (LOCALE_MESSAGEBOX_INFO, "Remove screenshot ?", CMessageBox::mbrNo, CMessageBox:: mbYes | CMessageBox::mbNo) == CMessageBox::mbrYes) { if(ShowMsg (LOCALE_MESSAGEBOX_INFO, "Remove screenshot ?", CMessageBox::mbrNo, CMessageBox:: mbYes | CMessageBox::mbNo) == CMessageBox::mbrYes) {
std::string fname = getScreenshotName(m_movieSelectionHandler->file.Name); std::string fname = getScreenshotName(m_movieSelectionHandler->file.Name);