From fbf0df5ebbcda7eae95bc4adead47f0020fa6739 Mon Sep 17 00:00:00 2001 From: Michael Liebmann Date: Fri, 23 Dec 2011 21:33:21 +0000 Subject: [PATCH] Moviebrowser: Display Screenshot - Delete the image files if the movie is deleted - Calculation of the adjusted image size on 16:9 git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-beta@1993 e54a6e83-5905-42d5-8d5c-058d10e6a962 Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/31c9a9a67eb0f3c95667295916262adf0926b62d Author: Michael Liebmann Date: 2011-12-23 (Fri, 23 Dec 2011) Origin message was: ------------------ * Moviebrowser: Display Screenshot - Delete the image files if the movie is deleted - Calculation of the adjusted image size on 16:9 git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-beta@1993 e54a6e83-5905-42d5-8d5c-058d10e6a962 ------------------ This commit was generated by Migit --- src/gui/moviebrowser.cpp | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/src/gui/moviebrowser.cpp b/src/gui/moviebrowser.cpp index 4bfab3e0d..0df5caada 100644 --- a/src/gui/moviebrowser.cpp +++ b/src/gui/moviebrowser.cpp @@ -1216,9 +1216,8 @@ void CMovieBrowser::refreshMovieInfo(void) else { bool logo_ok = false; - float divx = (float)576 / (float)m_cBoxFrameInfo.iHeight; - int picw = (int)((float)720 / divx); - int pich = (int)((float)576 / divx); + int picw = (int)(((float)16 / (float)9) * (float)m_cBoxFrameInfo.iHeight); + int pich = m_cBoxFrameInfo.iHeight; std::string fname = getScreenshotName(m_movieSelectionHandler->file.Name); logo_ok = (fname != ""); @@ -1798,9 +1797,9 @@ bool CMovieBrowser::onButtonPressMainFrame(neutrino_msg_t msg) } else if (msg == CRCInput::RC_topleft) { if (m_movieSelectionHandler != NULL) { if(ShowMsgUTF (LOCALE_MESSAGEBOX_INFO, "Remove screenshot ?", CMessageBox::mbrNo, CMessageBox:: mbYes | CMessageBox::mbNo) == CMessageBox::mbrYes) { - std::string fname = m_movieSelectionHandler->file.Name; - strReplace(fname, ".ts", ".bmp"); - unlink(fname.c_str()); + std::string fname = getScreenshotName(m_movieSelectionHandler->file.Name); + if (fname != "") + unlink(fname.c_str()); refresh(); } } @@ -2060,10 +2059,10 @@ void CMovieBrowser::onDeleteFile(MI_MOVIE_INFO& movieSelectionHandler) } i++; } while(1); - std::string fname = movieSelectionHandler.file.Name; - strReplace(fname, ".ts", ".bmp"); - unlink(fname.c_str()); #endif + std::string fname = getScreenshotName(movieSelectionHandler.file.Name); + if (fname != "") + unlink(fname.c_str()); CFile file_xml = movieSelectionHandler.file; if(m_movieInfo.convertTs2XmlName(&file_xml.Name) == true)