mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-27 23:42:51 +02:00
add menu option to delete 'removed channels'
Origin commit data
------------------
Branch: ni/coolstream
Commit: da327c099b
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2013-04-14 (Sun, 14 Apr 2013)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
committed by
[CST] Focus
parent
c5aa1f78e9
commit
2df5731cf6
@@ -459,12 +459,16 @@ int CDataResetNotifier::exec(CMenuTarget* /*parent*/, const std::string& actionK
|
||||
bool delete_all = (actionKey == "all");
|
||||
bool delete_chan = (actionKey == "channels") || delete_all;
|
||||
bool delete_set = (actionKey == "settings") || delete_all;
|
||||
bool delete_removed = (actionKey == "delete_removed");
|
||||
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)
|
||||
return true;
|
||||
/* no need to confirm if we only remove deleted channels */
|
||||
if (!delete_removed) {
|
||||
int result = ShowMsgUTF(msg, g_Locale->getText(LOCALE_RESET_CONFIRM), CMessageBox::mbrNo, CMessageBox::mbYes | CMessageBox::mbNo);
|
||||
if (result != CMessageBox::mbrYes)
|
||||
return true;
|
||||
}
|
||||
|
||||
if(delete_all) {
|
||||
my_system(3, "/bin/sh", "-c", "rm -f " CONFIGDIR "/zapit/*.conf");
|
||||
@@ -490,6 +494,10 @@ int CDataResetNotifier::exec(CMenuTarget* /*parent*/, const std::string& actionK
|
||||
my_system(3, "/bin/sh", "-c", "rm -f " CONFIGDIR "/zapit/*.xml");
|
||||
g_Zapit->reinitChannels();
|
||||
}
|
||||
if (delete_removed) {
|
||||
CServiceManager::getInstance()->SaveServices(true, false, true);
|
||||
g_Zapit->reinitChannels();
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user