From 283963b6cb0bcc805e839711c8698917f199fce9 Mon Sep 17 00:00:00 2001 From: Michael Liebmann Date: Tue, 20 Oct 2015 22:42:59 +0200 Subject: [PATCH] neutrino.cpp: toggle easy menu only when reboot occurs Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/9080c421b9d9f50e62d906e1b8d5b3f0d02bc81a Author: Michael Liebmann Date: 2015-10-20 (Tue, 20 Oct 2015) --- src/neutrino.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/neutrino.cpp b/src/neutrino.cpp index 75369a1b4..ab0729e08 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -3954,11 +3954,12 @@ int CNeutrinoApp::exec(CMenuTarget* parent, const std::string & actionKey) if (parent) parent->hide(); - g_settings.easymenu = (g_settings.easymenu == 0) ? 1 : 0; - INFO("change easymenu to %d\n", g_settings.easymenu); - const char * text = g_settings.easymenu ? "Easy menu switched ON, restart box ?" : "Easy menu switched OFF, restart box ?"; - if (ShowMsg(LOCALE_MESSAGEBOX_INFO, text, CMessageBox::mbrNo, CMessageBox::mbYes | CMessageBox::mbNo, NEUTRINO_ICON_INFO, 0) == CMessageBox::mbrYes) + std::string text = "Easy menu switched " + string(g_settings.easymenu?"OFF":"ON") + string(", when restart box.\nRestart now?"); + if (ShowMsg(LOCALE_MESSAGEBOX_INFO, text, CMessageBox::mbrNo, CMessageBox::mbYes | CMessageBox::mbNo, NEUTRINO_ICON_INFO, 0) == CMessageBox::mbrYes) { + g_settings.easymenu = (g_settings.easymenu == 0) ? 1 : 0; + INFO("change easymenu to %d\n", g_settings.easymenu); g_RCInput->postMsg(NeutrinoMessages::REBOOT, 0); + } } }