diff --git a/src/gui/pictureviewer.cpp b/src/gui/pictureviewer.cpp index b9ff75972..3e8a75d11 100644 --- a/src/gui/pictureviewer.cpp +++ b/src/gui/pictureviewer.cpp @@ -79,10 +79,12 @@ #include extern cVideo * videoDecoder; - //NI InfoIcons #include +#define PICTUREVIEWER_START_SCRIPT CONFIGDIR "/pictureviewer.start" +#define PICTUREVIEWER_END_SCRIPT CONFIGDIR "/pictureviewer.end" + //------------------------------------------------------------------------ bool comparePictureByDate (const CPicture& a, const CPicture& b) { @@ -192,6 +194,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 @@ -225,6 +231,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();