pictureviewer: re-introduce pictureviewer.start/end scripts

Origin commit data
------------------
Branch: ni/coolstream
Commit: 842808c008
Author: vanhofen <vanhofen@gmx.de>
Date: 2019-01-24 (Thu, 24 Jan 2019)

Origin message was:
------------------
- pictureviewer: re-introduce pictureviewer.start/end scripts

------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
vanhofen
2019-01-24 22:05:37 +01:00
parent 94851e0e63
commit 0287bce5a1

View File

@@ -79,10 +79,12 @@
#include <hardware/video.h> #include <hardware/video.h>
extern cVideo * videoDecoder; extern cVideo * videoDecoder;
//NI InfoIcons //NI InfoIcons
#include <gui/infoicons.h> #include <gui/infoicons.h>
#define PICTUREVIEWER_START_SCRIPT CONFIGDIR "/pictureviewer.start"
#define PICTUREVIEWER_END_SCRIPT CONFIGDIR "/pictureviewer.end"
//------------------------------------------------------------------------ //------------------------------------------------------------------------
bool comparePictureByDate (const CPicture& a, const CPicture& b) bool comparePictureByDate (const CPicture& a, const CPicture& b)
{ {
@@ -192,6 +194,10 @@ int CPictureViewerGui::exec(CMenuTarget* parent, const std::string & actionKey)
if (parent) if (parent)
parent->hide(); parent->hide();
puts("[pictureviewer.cpp] executing " PICTUREVIEWER_START_SCRIPT ".");
if (my_system(PICTUREVIEWER_START_SCRIPT) != 0)
perror(PICTUREVIEWER_START_SCRIPT " failed");
// remember last mode // remember last mode
m_LastMode = CNeutrinoApp::getInstance()->getMode(); m_LastMode = CNeutrinoApp::getInstance()->getMode();
// tell neutrino we're in pic_mode // tell neutrino we're in pic_mode
@@ -225,6 +231,10 @@ int CPictureViewerGui::exec(CMenuTarget* parent, const std::string & actionKey)
CZapit::getInstance()->EnablePlayback(true); 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 // Restore previous background
if (usedBackground) { if (usedBackground) {
frameBuffer->restoreBackgroundImage(); frameBuffer->restoreBackgroundImage();