From aaac28d41b700b92ef279d573ad113ebfe7a0f85 Mon Sep 17 00:00:00 2001 From: svenhoefer Date: Thu, 24 Jan 2019 22:05:37 +0100 Subject: [PATCH] - pictureviewer: re-introduce pictureviewer.start/end scripts Conflicts: src/gui/pictureviewer.cpp Signed-off-by: Thilo Graf --- src/gui/pictureviewer.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/gui/pictureviewer.cpp b/src/gui/pictureviewer.cpp index af00cca83..5b38d72ff 100644 --- a/src/gui/pictureviewer.cpp +++ b/src/gui/pictureviewer.cpp @@ -67,6 +67,7 @@ #include +#include #include #include @@ -78,6 +79,8 @@ #include extern cVideo * videoDecoder; +#define PICTUREVIEWER_START_SCRIPT CONFIGDIR "/pictureviewer.start" +#define PICTUREVIEWER_END_SCRIPT CONFIGDIR "/pictureviewer.end" //------------------------------------------------------------------------ bool comparePictureByDate (const CPicture& a, const CPicture& b) @@ -188,6 +191,10 @@ int CPictureViewerGui::exec(CMenuTarget* parent, const std::string & actionKey) if (parent) parent->hide(); + puts("[pictureviewer.cpp] executing " PICTUREVIEWER_START_SCRIPT "."); + if (my_system(PICTUREVIEWER_START_SCRIPT) != 0) + perror(PICTUREVIEWER_START_SCRIPT " failed"); + // remember last mode m_LastMode = CNeutrinoApp::getInstance()->getMode(); // tell neutrino we're in pic_mode @@ -217,6 +224,10 @@ int CPictureViewerGui::exec(CMenuTarget* parent, const std::string & actionKey) CZapit::getInstance()->EnablePlayback(true); } + puts("[pictureviewer.cpp] executing " PICTUREVIEWER_END_SCRIPT "."); + if (my_system(PICTUREVIEWER_END_SCRIPT) != 0) + perror(PICTUREVIEWER_END_SCRIPT " failed"); + // Restore previous background if (usedBackground) { frameBuffer->restoreBackgroundImage();