neutrino: add "need_reboot" feature

Origin commit data
------------------
Commit: f6253de913
Author: vanhofen <vanhofen@gmx.de>
Date: 2017-11-14 (Tue, 14 Nov 2017)

Origin message was:
------------------
- neutrino: add "need_reboot" feature
This commit is contained in:
vanhofen
2017-11-14 22:43:39 +01:00
parent 40732c1181
commit 6f4f96f06e
6 changed files with 12 additions and 0 deletions

View File

@@ -4661,6 +4661,12 @@ int CNeutrinoApp::exec(CMenuTarget* parent, const std::string & actionKey)
else if(actionKey=="shutdown") {
ExitRun(1);
}
else if(actionKey=="need_reboot")
{
int reboot_now = ShowMsg(LOCALE_MESSAGEBOX_INFO, LOCALE_MESSAGEBOX_NEED_REBOOT, CMsgBox::mbrYes, CMsgBox::mbYes | CMsgBox::mbNo, NEUTRINO_ICON_SETTINGS);
if (reboot_now == CMsgBox::mbrYes)
CNeutrinoApp::getInstance()->exec(NULL, "reboot");
}
else if(actionKey=="reboot")
{
FILE *f = fopen("/tmp/.reboot", "w");