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:
2014-10-16 14:05:30 +02:00
parent 1f81228d7b
commit 8f621ef472
2 changed files with 7 additions and 2 deletions

View File

@@ -3869,6 +3869,9 @@ int CNeutrinoApp::exec(CMenuTarget* parent, const std::string & actionKey)
return menu_return::RETURN_EXIT_ALL;
}
else if(actionKey=="restart") {
//usage of slots from any classes
OnBeforeRestart();
if (recordingstatus)
DisplayErrorMessage(g_Locale->getText(LOCALE_SERVICEMENU_RESTART_REFUSED_RECORDING));
else {