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


Origin commit data
------------------
Commit: 8f621ef472
Author: Thilo Graf <dbt@novatux.de>
Date: 2014-10-16 (Thu, 16 Oct 2014)
This commit is contained in:
2014-10-16 14:05:30 +02:00
parent c9956ada97
commit 51724aa8b4
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 {