Factory reset to delete all, with reboot

git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@806 e54a6e83-5905-42d5-8d5c-058d10e6a962


Origin commit data
------------------
Branch: ni/coolstream
Commit: 64817a6044
Author: [CST] Focus <focus.cst@gmail.com>
Date: 2010-09-30 (Thu, 30 Sep 2010)



------------------
This commit was generated by Migit
This commit is contained in:
[CST] Focus
2010-09-30 15:55:16 +00:00
parent 49c0a24a57
commit 85eb93ba09
6 changed files with 14 additions and 3 deletions

View File

@@ -936,6 +936,7 @@ int CDataResetNotifier::exec(CMenuTarget* /*parent*/, const std::string& actionK
bool delete_chan = (actionKey == "channels") || delete_all;
bool delete_set = (actionKey == "settings") || delete_all;
neutrino_locale_t msg = delete_all ? LOCALE_RESET_ALL : delete_chan ? LOCALE_RESET_CHANNELS : LOCALE_RESET_SETTINGS;
int ret = menu_return::RETURN_REPAINT;
int result = ShowMsgUTF(msg, g_Locale->getText(LOCALE_RESET_CONFIRM), CMessageBox::mbrNo, CMessageBox::mbYes | CMessageBox::mbNo);
if(result != CMessageBox::mbrYes)
@@ -945,6 +946,8 @@ int CDataResetNotifier::exec(CMenuTarget* /*parent*/, const std::string& actionK
system("rm -f /var/tuxbox/config/zapit/*.conf");
loadZapitSettings();
getZapitConfig(&zapitCfg);
g_RCInput->postMsg( NeutrinoMessages::REBOOT, 0);
ret = menu_return::RETURN_EXIT_ALL;
}
if(delete_set) {
unlink(NEUTRINO_SETTINGS_FILE);
@@ -959,8 +962,9 @@ int CDataResetNotifier::exec(CMenuTarget* /*parent*/, const std::string& actionK
system("rm -f /var/tuxbox/config/zapit/*.xml");
g_Zapit->reinitChannels();
}
return true;
return ret;
}
bool CLedControlNotifier::changeNotify(const neutrino_locale_t, void* /*data*/)
{
CVFD::getInstance()->setled();