mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-31 09:21:18 +02:00
- pictureviewer: re-introduce pictureviewer.start/end scripts
Conflicts: src/gui/pictureviewer.cpp Signed-off-by: Thilo Graf <dbt@novatux.de>
This commit is contained in:
@@ -67,6 +67,7 @@
|
|||||||
#include <driver/display.h>
|
#include <driver/display.h>
|
||||||
|
|
||||||
|
|
||||||
|
#include <system/helpers.h>
|
||||||
#include <system/settings.h>
|
#include <system/settings.h>
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
@@ -78,6 +79,8 @@
|
|||||||
#include <hardware/video.h>
|
#include <hardware/video.h>
|
||||||
extern cVideo * videoDecoder;
|
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)
|
bool comparePictureByDate (const CPicture& a, const CPicture& b)
|
||||||
@@ -188,6 +191,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
|
||||||
@@ -217,6 +224,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();
|
||||||
|
Reference in New Issue
Block a user