mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-27 15:32:59 +02:00
- neutrino: add "need_reboot" feature
Signed-off-by: Thilo Graf <dbt@novatux.de>
This commit is contained in:
@@ -1794,6 +1794,7 @@ messagebox.discard Wollen Sie die Änderungen verwerfen?
|
|||||||
messagebox.error Fehler
|
messagebox.error Fehler
|
||||||
messagebox.feature_not_supported Funktion wird nicht unterstützt. Bitte wenden Sie sich an Ihren Firmware-Anbieter!
|
messagebox.feature_not_supported Funktion wird nicht unterstützt. Bitte wenden Sie sich an Ihren Firmware-Anbieter!
|
||||||
messagebox.info Information
|
messagebox.info Information
|
||||||
|
messagebox.need_reboot Die Box muss neu gestartet werden, um die Änderungen wirksam zu machen.\nSoll jetzt neu gestartet werden?
|
||||||
messagebox.no Nein
|
messagebox.no Nein
|
||||||
messagebox.ok OK
|
messagebox.ok OK
|
||||||
messagebox.yes Ja
|
messagebox.yes Ja
|
||||||
|
@@ -1794,6 +1794,7 @@ messagebox.discard Discard changes?
|
|||||||
messagebox.error Error
|
messagebox.error Error
|
||||||
messagebox.feature_not_supported Feature is not supported. Please contact your firmware provider!
|
messagebox.feature_not_supported Feature is not supported. Please contact your firmware provider!
|
||||||
messagebox.info Information
|
messagebox.info Information
|
||||||
|
messagebox.need_reboot The box must be restarted to make the changes effective.\nRestart now?
|
||||||
messagebox.no No
|
messagebox.no No
|
||||||
messagebox.ok Ok
|
messagebox.ok Ok
|
||||||
messagebox.yes Yes
|
messagebox.yes Yes
|
||||||
|
@@ -5040,6 +5040,12 @@ int CNeutrinoApp::exec(CMenuTarget* parent, const std::string & actionKey)
|
|||||||
{
|
{
|
||||||
ExitRun(g_info.hw_caps->can_shutdown);
|
ExitRun(g_info.hw_caps->can_shutdown);
|
||||||
}
|
}
|
||||||
|
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")
|
else if(actionKey=="reboot")
|
||||||
{
|
{
|
||||||
ExitRun(CNeutrinoApp::EXIT_REBOOT);
|
ExitRun(CNeutrinoApp::EXIT_REBOOT);
|
||||||
|
@@ -1821,6 +1821,7 @@ typedef enum
|
|||||||
LOCALE_MESSAGEBOX_ERROR,
|
LOCALE_MESSAGEBOX_ERROR,
|
||||||
LOCALE_MESSAGEBOX_FEATURE_NOT_SUPPORTED,
|
LOCALE_MESSAGEBOX_FEATURE_NOT_SUPPORTED,
|
||||||
LOCALE_MESSAGEBOX_INFO,
|
LOCALE_MESSAGEBOX_INFO,
|
||||||
|
LOCALE_MESSAGEBOX_NEED_REBOOT,
|
||||||
LOCALE_MESSAGEBOX_NO,
|
LOCALE_MESSAGEBOX_NO,
|
||||||
LOCALE_MESSAGEBOX_OK,
|
LOCALE_MESSAGEBOX_OK,
|
||||||
LOCALE_MESSAGEBOX_YES,
|
LOCALE_MESSAGEBOX_YES,
|
||||||
|
@@ -1821,6 +1821,7 @@ const char * locale_real_names[] =
|
|||||||
"messagebox.error",
|
"messagebox.error",
|
||||||
"messagebox.feature_not_supported",
|
"messagebox.feature_not_supported",
|
||||||
"messagebox.info",
|
"messagebox.info",
|
||||||
|
"messagebox.need_reboot",
|
||||||
"messagebox.no",
|
"messagebox.no",
|
||||||
"messagebox.ok",
|
"messagebox.ok",
|
||||||
"messagebox.yes",
|
"messagebox.yes",
|
||||||
|
@@ -206,6 +206,8 @@ bool CFlagFileNotifier::changeNotify(const neutrino_locale_t, void * data)
|
|||||||
}
|
}
|
||||||
remove(flagfile.c_str());
|
remove(flagfile.c_str());
|
||||||
}
|
}
|
||||||
|
if (strstr(filename, "ciplushelper"))
|
||||||
|
CNeutrinoApp::getInstance()->exec(NULL, "need_reboot");
|
||||||
return menu_return::RETURN_REPAINT;
|
return menu_return::RETURN_REPAINT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user