diff --git a/data/locale/deutsch.locale b/data/locale/deutsch.locale index 784a8585f..1697ab2ef 100644 --- a/data/locale/deutsch.locale +++ b/data/locale/deutsch.locale @@ -1794,6 +1794,7 @@ messagebox.discard Wollen Sie die Änderungen verwerfen? messagebox.error Fehler messagebox.feature_not_supported Funktion wird nicht unterstützt. Bitte wenden Sie sich an Ihren Firmware-Anbieter! 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.ok OK messagebox.yes Ja diff --git a/data/locale/english.locale b/data/locale/english.locale index 966603fe2..7e5ba7a7d 100644 --- a/data/locale/english.locale +++ b/data/locale/english.locale @@ -1794,6 +1794,7 @@ messagebox.discard Discard changes? messagebox.error Error messagebox.feature_not_supported Feature is not supported. Please contact your firmware provider! messagebox.info Information +messagebox.need_reboot The box must be restarted to make the changes effective.\nRestart now? messagebox.no No messagebox.ok Ok messagebox.yes Yes diff --git a/src/neutrino.cpp b/src/neutrino.cpp index 5c3b6f8d5..83a4769b8 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -5040,6 +5040,12 @@ int CNeutrinoApp::exec(CMenuTarget* parent, const std::string & actionKey) { 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") { ExitRun(CNeutrinoApp::EXIT_REBOOT); diff --git a/src/system/locals.h b/src/system/locals.h index 93d5b515e..77c7cd877 100644 --- a/src/system/locals.h +++ b/src/system/locals.h @@ -1821,6 +1821,7 @@ typedef enum LOCALE_MESSAGEBOX_ERROR, LOCALE_MESSAGEBOX_FEATURE_NOT_SUPPORTED, LOCALE_MESSAGEBOX_INFO, + LOCALE_MESSAGEBOX_NEED_REBOOT, LOCALE_MESSAGEBOX_NO, LOCALE_MESSAGEBOX_OK, LOCALE_MESSAGEBOX_YES, diff --git a/src/system/locals_intern.h b/src/system/locals_intern.h index 6f09e0685..6a0803d70 100644 --- a/src/system/locals_intern.h +++ b/src/system/locals_intern.h @@ -1821,6 +1821,7 @@ const char * locale_real_names[] = "messagebox.error", "messagebox.feature_not_supported", "messagebox.info", + "messagebox.need_reboot", "messagebox.no", "messagebox.ok", "messagebox.yes", diff --git a/src/system/setting_helpers.cpp b/src/system/setting_helpers.cpp index dbd28ff02..8307ca0d1 100644 --- a/src/system/setting_helpers.cpp +++ b/src/system/setting_helpers.cpp @@ -206,6 +206,8 @@ bool CFlagFileNotifier::changeNotify(const neutrino_locale_t, void * data) } remove(flagfile.c_str()); } + if (strstr(filename, "ciplushelper")) + CNeutrinoApp::getInstance()->exec(NULL, "need_reboot"); return menu_return::RETURN_REPAINT; }