diff --git a/src/driver/lcd4l.cpp b/src/driver/lcd4l.cpp index d81793289..e0135cbfe 100644 --- a/src/driver/lcd4l.cpp +++ b/src/driver/lcd4l.cpp @@ -240,6 +240,16 @@ int CLCD4l::RemoveFile(const char *file) return ret; } +int CLCD4l::CreateEventFile(std::string content, bool convert) +{ + return CreateFile(EVENT, content, convert); +} + +int CLCD4l::RemoveEventFile() +{ + return RemoveFile(EVENT); +} + int CLCD4l::CreateMenuFile(std::string content, bool convert) { return CreateFile(MENU, content, convert); @@ -777,6 +787,11 @@ void CLCD4l::ParseInfo(uint64_t parseID, bool newID, bool firstRun) Logo = ICONSDIR "/" NEUTRINO_ICON_PLAY ICONSEXT; Service = g_Locale->getText(LOCALE_MAINMENU_AVINPUTMODE); } + else if (parseID == NeutrinoModes::mode_moviebrowser) + { + Logo = ICONSDIR "/" NEUTRINO_ICON_MOVIEPLAYER ICONSEXT; + Service = g_Locale->getText(LOCALE_MOVIEBROWSER_HEAD); + } else if (parseID == NeutrinoModes::mode_ts) { if (ModeTshift) @@ -1071,6 +1086,10 @@ void CLCD4l::ParseInfo(uint64_t parseID, bool newID, bool firstRun) // TODO: Event = Bildname } #endif + else if (parseID == NeutrinoModes::mode_moviebrowser) + { + // do nothing; Event is processed in moviebrowser + } else if (parseID == NeutrinoModes::mode_ts) { if (CMoviePlayerGui::getInstance().p_movie_info) diff --git a/src/driver/lcd4l.h b/src/driver/lcd4l.h index c4fdcbc43..af220b5c2 100644 --- a/src/driver/lcd4l.h +++ b/src/driver/lcd4l.h @@ -61,6 +61,8 @@ class CLCD4l int CreateFile(const char *file, std::string content = "", bool convert = false); int RemoveFile(const char *file); + int CreateEventFile(std::string content = "", bool convert = false); + int RemoveEventFile(); int CreateMenuFile(std::string content = "", bool convert = false); int RemoveMenuFile(); diff --git a/src/gui/moviebrowser/mb.cpp b/src/gui/moviebrowser/mb.cpp index bacfada11..cf8fa9211 100644 --- a/src/gui/moviebrowser/mb.cpp +++ b/src/gui/moviebrowser/mb.cpp @@ -80,6 +80,10 @@ #include #include +#ifdef ENABLE_LCD4LINUX +#include "driver/lcd4l.h" +#endif + extern CPictureViewer * g_PicViewer; extern bool timeset; @@ -1070,7 +1074,12 @@ int CMovieBrowser::exec(const char* path) neutrino_msg_t msg; neutrino_msg_data_t data; + // tell neutrino we're in moviebrowser mode + m_LastMode = CNeutrinoApp::getInstance()->getMode(); + CNeutrinoApp::getInstance()->handleMsg(NeutrinoMessages::CHANGEMODE, NeutrinoModes::mode_moviebrowser | NeutrinoModes::norezap); + CVFD::getInstance()->setMode(CVFD::MODE_MENU_UTF8, g_Locale->getText(LOCALE_MOVIEBROWSER_HEAD)); + loadSettings(&m_settings); initFrames(); @@ -1185,6 +1194,14 @@ int CMovieBrowser::exec(const char* path) loop = false; g_RCInput->postMsg(msg, data); } + else if (msg == NeutrinoMessages::CHANGEMODE) + { + if ((data & NeutrinoModes::mode_mask) != NeutrinoModes::mode_moviebrowser) + { + loop = false; + m_LastMode = data; + } + } else if (CNeutrinoApp::getInstance()->handleMsg(msg, data) & messages_return::cancel_all) { TRACE("[mb]->exec: getInstance\n"); @@ -1212,7 +1229,8 @@ int CMovieBrowser::exec(const char* path) fileInfoStale(); } - //CVFD::getInstance()->setMode(CVFD::MODE_TVRADIO); + CNeutrinoApp::getInstance()->handleMsg(NeutrinoMessages::CHANGEMODE, m_LastMode); + return (res); } @@ -1258,8 +1276,6 @@ int CMovieBrowser::paint(void) { TRACE("[mb]->%s\n", __func__); - //CVFD::getInstance()->setMode(CVFD::MODE_MENU_UTF8, g_Locale->getText(LOCALE_MOVIEBROWSER_HEAD)); - Font* font = g_Font[SNeutrinoSettings::FONT_TYPE_MOVIEBROWSER_LIST]; m_movieSelectionHandler = NULL; @@ -1675,6 +1691,11 @@ void CMovieBrowser::refreshLCD(void) if (m_vMovieInfo.empty() || m_movieSelectionHandler == NULL) return; +#ifdef ENABLE_LCD4LINUX + if (g_settings.lcd4l_support) + CLCD4l::getInstance()->CreateEventFile(m_movieSelectionHandler->epgTitle.c_str(), g_settings.lcd4l_convert); +#endif + CVFD::getInstance()->showMenuText(0, m_movieSelectionHandler->epgTitle.c_str(), -1, true); // UTF-8 } @@ -4597,7 +4618,13 @@ int CMenuSelector::paint(bool selected) g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(stringstartposName, y+height,dx- (stringstartposName - x), optionName, color); if (selected) + { +#ifdef ENABLE_LCD4LINUX + if (g_settings.lcd4l_support) + CLCD4l::getInstance()->CreateEventFile(optionName, g_settings.lcd4l_convert); +#endif CVFD::getInstance()->showMenuText(0, optionName, -1, true); // UTF-8 + } return y+height; } diff --git a/src/gui/moviebrowser/mb.h b/src/gui/moviebrowser/mb.h index 1a000d0fe..9ab4a975a 100644 --- a/src/gui/moviebrowser/mb.h +++ b/src/gui/moviebrowser/mb.h @@ -221,6 +221,8 @@ class CMovieBrowser : public CMenuTarget, public CProgressSignals Font* m_pcFontTitle; std::string m_textTitle; + int m_LastMode; + MB_PARENTAL_LOCK m_parentalLock; MB_STORAGE_TYPE m_storageType;