mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-30 08:51:10 +02:00
neutrino.cpp: add signal OnBeforeRestart
This allows to handle events inside from objects with matching slots and events without explicit calls in neutrino.cpp. Used here general for stopping of thread in timer object. In some cases it could be necessary to stop timer thread otherwise it is possible that restart is blocked here. This happens here automatically, without separate instances of timer objects. Conflicts: src/neutrino.h
This commit is contained in:
@@ -3869,6 +3869,9 @@ int CNeutrinoApp::exec(CMenuTarget* parent, const std::string & actionKey)
|
|||||||
return menu_return::RETURN_EXIT_ALL;
|
return menu_return::RETURN_EXIT_ALL;
|
||||||
}
|
}
|
||||||
else if(actionKey=="restart") {
|
else if(actionKey=="restart") {
|
||||||
|
//usage of slots from any classes
|
||||||
|
OnBeforeRestart();
|
||||||
|
|
||||||
if (recordingstatus)
|
if (recordingstatus)
|
||||||
DisplayErrorMessage(g_Locale->getText(LOCALE_SERVICEMENU_RESTART_REFUSED_RECORDING));
|
DisplayErrorMessage(g_Locale->getText(LOCALE_SERVICEMENU_RESTART_REFUSED_RECORDING));
|
||||||
else {
|
else {
|
||||||
|
@@ -39,7 +39,7 @@
|
|||||||
#include "gui/personalize.h"
|
#include "gui/personalize.h"
|
||||||
#include "gui/user_menue.h"
|
#include "gui/user_menue.h"
|
||||||
#include <timerdclient/timerdtypes.h>
|
#include <timerdclient/timerdtypes.h>
|
||||||
|
#include <sigc++/signal.h>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#define ANNOUNCETIME (1 * 60)
|
#define ANNOUNCETIME (1 * 60)
|
||||||
@@ -57,7 +57,7 @@ class CFrameBuffer;
|
|||||||
class CConfigFile;
|
class CConfigFile;
|
||||||
class CScanSettings;
|
class CScanSettings;
|
||||||
|
|
||||||
class CNeutrinoApp : public CMenuTarget, CChangeObserver
|
class CNeutrinoApp : public CMenuTarget, CChangeObserver, sigc::trackable
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
enum
|
enum
|
||||||
@@ -228,6 +228,8 @@ public:
|
|||||||
void stopPlayBack(bool lock = false);
|
void stopPlayBack(bool lock = false);
|
||||||
bool adjustToChannelID(const t_channel_id channel_id);
|
bool adjustToChannelID(const t_channel_id channel_id);
|
||||||
void screensaver(bool);
|
void screensaver(bool);
|
||||||
|
//signal/event handler before restart of neutrino gui
|
||||||
|
sigc::signal<bool> OnBeforeRestart;
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user