diff --git a/data/locale/deutsch.locale b/data/locale/deutsch.locale index de10ff850..ef9f8f15b 100644 --- a/data/locale/deutsch.locale +++ b/data/locale/deutsch.locale @@ -1700,6 +1700,7 @@ messagebox.error Fehler messagebox.exit Beenden 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 632dea6ba..bcda00429 100644 --- a/data/locale/english.locale +++ b/data/locale/english.locale @@ -1699,6 +1699,7 @@ messagebox.error Error messagebox.exit Exit 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 f875f0bbf..a11276833 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -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"); diff --git a/src/system/locals.h b/src/system/locals.h index 83b4535f4..543f1b35f 100644 --- a/src/system/locals.h +++ b/src/system/locals.h @@ -1726,6 +1726,7 @@ typedef enum LOCALE_MESSAGEBOX_EXIT, 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 86a6e14fb..b7049141f 100644 --- a/src/system/locals_intern.h +++ b/src/system/locals_intern.h @@ -1726,6 +1726,7 @@ const char * locale_real_names[] = "messagebox.exit", "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 ed074d54c..b97b14b72 100644 --- a/src/system/setting_helpers.cpp +++ b/src/system/setting_helpers.cpp @@ -254,6 +254,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; }