mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 08:21:12 +02:00
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
This commit is contained in:
@@ -1393,7 +1393,7 @@ scrambled_channel Scrambled channel
|
||||
neutrino_starting Neutrino starting...
|
||||
reset_channels Delete all channels
|
||||
reset_settings Reset settings to defaults
|
||||
reset_all Factory reset
|
||||
reset_all Factory reset and reboot
|
||||
reset_confirm Are you sure ?
|
||||
cam.settings CI Cam
|
||||
cam.empty No CAM in slot
|
||||
|
@@ -3603,6 +3603,11 @@ printf("NeutrinoMessages::EVT_BOUQUETSCHANGED\n");fflush(stdout);
|
||||
}
|
||||
return messages_return::handled;
|
||||
}
|
||||
else if( msg == NeutrinoMessages::REBOOT ) {
|
||||
FILE *f = fopen("/tmp/.reboot", "w");
|
||||
fclose(f);
|
||||
ExitRun(true);
|
||||
}
|
||||
else if (msg == NeutrinoMessages::EVT_POPUP) {
|
||||
if (mode != mode_scart)
|
||||
ShowHintUTF(LOCALE_MESSAGEBOX_INFO, (const char *) data); // UTF-8
|
||||
|
@@ -71,6 +71,7 @@ struct NeutrinoMessages {
|
||||
REMIND = CRCInput::RC_Messages + 18,
|
||||
LOCK_RC = CRCInput::RC_Messages + 19,
|
||||
UNLOCK_RC = CRCInput::RC_Messages + 20,
|
||||
REBOOT = CRCInput::RC_Messages + 21,
|
||||
|
||||
EVT_VOLCHANGED = CRCInput::RC_Events + 1,
|
||||
EVT_MUTECHANGED = CRCInput::RC_Events + 2,
|
||||
|
@@ -873,6 +873,7 @@ void CNeutrinoApp::InitMainMenu(CMenuWidget &mainMenu, CMenuWidget &mainSettings
|
||||
mset->addItem(new CMenuForwarder(LOCALE_EXTRA_SAVECONFIG, true, NULL, this, "saveconfig"));
|
||||
mset->addItem(new CMenuForwarder(LOCALE_SETTINGS_BACKUP, true, NULL, this, "backup"));
|
||||
mset->addItem(new CMenuForwarder(LOCALE_SETTINGS_RESTORE, true, NULL, this, "restore"));
|
||||
mset->addItem(new CMenuForwarder(LOCALE_RESET_ALL, true, NULL, resetNotifier, "all"));
|
||||
|
||||
mainSettings.addItem(new CMenuForwarder(LOCALE_MAINSETTINGS_MANAGE, true, NULL, mset));
|
||||
|
||||
|
@@ -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();
|
||||
|
@@ -387,7 +387,7 @@ void init_sat(t_satellite_position position)
|
||||
int LoadServices(fe_type_t frontendType, diseqc_t /*diseqcType*/, bool only_current)
|
||||
{
|
||||
xmlDocPtr parser;
|
||||
bool satcleared = 0;
|
||||
static bool satcleared = 0;//clear only once, because menu is static
|
||||
scnt = 0;
|
||||
printf("[zapit] Loading services, channel size %d ..\n", sizeof(CZapitChannel));
|
||||
|
||||
|
Reference in New Issue
Block a user