From ca90c811285968b996c1eeff8f6fd4bbde3642fb Mon Sep 17 00:00:00 2001 From: vanhofen Date: Tue, 2 Jan 2024 22:29:38 +0100 Subject: [PATCH] lcd4l: add actionkey moviebrowser_moviecut Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/97cebad4ef47957c630a881715fa792468d25959 Author: vanhofen Date: 2024-01-02 (Tue, 02 Jan 2024) Origin message was: ------------------ - lcd4l: add actionkey moviebrowser_moviecut ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/driver/lcd4l.cpp | 23 ++++++++++++++++------- src/gui/moviebrowser/mb.cpp | 9 +++------ 2 files changed, 19 insertions(+), 13 deletions(-) diff --git a/src/driver/lcd4l.cpp b/src/driver/lcd4l.cpp index c747fc117..0025c9fa6 100644 --- a/src/driver/lcd4l.cpp +++ b/src/driver/lcd4l.cpp @@ -376,7 +376,8 @@ void *CLCD4l::LCD4lProc(void *arg) { usleep(5 * 100 * 1000); // 0.5 sec new_ParseID = PLCD4l->CompareParseID(p_ParseID); - if (new_ParseID || p_ParseID == NeutrinoModes::mode_audio || !PLCD4l->m_ActionKey.empty()) { + if (new_ParseID || p_ParseID == NeutrinoModes::mode_audio || !PLCD4l->m_ActionKey.empty()) + { break; } } @@ -749,8 +750,8 @@ void CLCD4l::ParseInfo(uint64_t parseID, bool newID, bool firstRun) if (m_ActionKey == "moviebrowser") { - g_PicViewer->GetLogoName(0, "Moviebrowser", Logo, &dummy, &dummy, CPictureViewer::LCD4LINUX, true); Service = g_Locale->getText(LOCALE_MOVIEBROWSER_HEAD); + g_PicViewer->GetLogoName(0, "Moviebrowser", Logo, &dummy, &dummy, CPictureViewer::LCD4LINUX, true); } else if (m_ModeChannel) { @@ -759,7 +760,16 @@ void CLCD4l::ParseInfo(uint64_t parseID, bool newID, bool firstRun) else Service = g_RemoteControl->getCurrentChannelName(); - g_PicViewer->GetLogoName(parseID, Service, Logo, &dummy, &dummy, CPictureViewer::LCD4LINUX, true); + /* + "moviebrowser_moviecut" is special. + It signals the active moviebrowser with the moviebrowser logo, + but handles the rest of the lcd as in tv/radio mode. + */ + + if (m_ActionKey == "moviebrowser_moviecut") + g_PicViewer->GetLogoName(0, "Moviebrowser", Logo, &dummy, &dummy, CPictureViewer::LCD4LINUX, true); + else + g_PicViewer->GetLogoName(parseID, Service, Logo, &dummy, &dummy, CPictureViewer::LCD4LINUX, true); ChannelNr = CNeutrinoApp::getInstance()->channelList->getActiveChannelNumber(); } @@ -797,9 +807,8 @@ void CLCD4l::ParseInfo(uint64_t parseID, bool newID, bool firstRun) } else if (parseID == NeutrinoModes::mode_avinput) { - //FIXME - Logo = ICONSDIR "/" NEUTRINO_ICON_PLAY ICONSEXT; Service = g_Locale->getText(LOCALE_MAINMENU_AVINPUTMODE); + Logo = ICONSDIR "/" NEUTRINO_ICON_PLAY ICONSEXT; } else if (parseID == NeutrinoModes::mode_ts) { @@ -973,9 +982,9 @@ void CLCD4l::ParseInfo(uint64_t parseID, bool newID, bool firstRun) bool writeEvent = true; - if (!m_ActionKey.empty()) + if (m_ActionKey == "moviebrowser") { - // do nothing; Event is processed in moviebrowser or other windows + // do nothing; Event is processed in moviebrowser writeEvent = false; } else if (m_ModeChannel) diff --git a/src/gui/moviebrowser/mb.cpp b/src/gui/moviebrowser/mb.cpp index 8d8757217..31d32cce9 100644 --- a/src/gui/moviebrowser/mb.cpp +++ b/src/gui/moviebrowser/mb.cpp @@ -936,10 +936,9 @@ int CMovieBrowser::exec(CMenuTarget* parent, const std::string & actionKey) #ifdef ENABLE_LCD4LINUX if (g_settings.lcd4l_support) - CLCD4l::getInstance()->clearActionKey(); + CLCD4l::getInstance()->setActionKey("moviebrowser_moviecut"); #endif - // TODO: signalize running action CMovieCut mc; bool res = mc.copyMovie(m_movieSelectionHandler, onefile); @@ -974,10 +973,9 @@ int CMovieBrowser::exec(CMenuTarget* parent, const std::string & actionKey) #ifdef ENABLE_LCD4LINUX if (g_settings.lcd4l_support) - CLCD4l::getInstance()->clearActionKey(); + CLCD4l::getInstance()->setActionKey("moviebrowser_moviecut"); #endif - // TODO: signalize running action CMovieCut mc; bool res = mc.cutMovie(m_movieSelectionHandler); @@ -1014,10 +1012,9 @@ int CMovieBrowser::exec(CMenuTarget* parent, const std::string & actionKey) #ifdef ENABLE_LCD4LINUX if (g_settings.lcd4l_support) - CLCD4l::getInstance()->clearActionKey(); + CLCD4l::getInstance()->setActionKey("moviebrowser_moviecut"); #endif - // TODO: signalize running action CMovieCut mc; bool res = mc.truncateMovie(m_movieSelectionHandler);