diff --git a/data/locale/deutsch.locale b/data/locale/deutsch.locale index 13a07b625..8dd7b7a42 100644 --- a/data/locale/deutsch.locale +++ b/data/locale/deutsch.locale @@ -755,6 +755,7 @@ menu.hint_content_textcolor Ändern Sie die Textfarbe für den Fensterinhalt menu.hint_contrast_fonts Wählen Sie einen höheren Schriftkontrast menu.hint_dboxinfo Informationen über CPU und Arbeitsspeicher der Box menu.hint_delete_channels Löschen aller Kanäle +menu.hint_delete_removed Lösche das Bouquet 'Gelöschte Kanäle' menu.hint_epg_cache Maximum in Tagen zukünftiger EPG-Daten menu.hint_epg_dir Speicherverzeichnis auf einem externen Datenträger zum Speichern von EPG-Daten menu.hint_epg_extendedcache Maximum in Stunden, die die EPG-Daten bzw. die Event-Beschreibungen zwischengespeichert werden @@ -1553,6 +1554,7 @@ repeatblocker.hint_2 0 schaltet den Blocker aus (Rot ist " ") reset_all Werkseinstellungen und Reboot reset_channels Lösche Kanäle reset_confirm Sind Sie sich sicher? +reset_removed Entferne gelöschte Kanäle reset_settings Einstellungen auf Standardwerte satsetup.auto_scan Automatisch einen gewählten %s satsetup.auto_scan_all Automatisch alle Satelliten diff --git a/data/locale/english.locale b/data/locale/english.locale index 4bf707963..63d8d2571 100644 --- a/data/locale/english.locale +++ b/data/locale/english.locale @@ -760,6 +760,7 @@ menu.hint_content_textcolor Change GUI window text color menu.hint_contrast_fonts Make fonts contrast (do not blend with background) menu.hint_dboxinfo Information about box cpu and storage menu.hint_delete_channels Remove all channels +menu.hint_delete_removed Delete the channels in the 'Removed channels' boquet menu.hint_epg_cache Maximum days to cache for future events menu.hint_epg_dir Select directory on harddisk or usb flash\nto save EPG. menu.hint_epg_extendedcache Maximum hours to cache extended\nevents descriptions @@ -1571,6 +1572,7 @@ repeatblocker.hint_2 Enter 0 to switch of the blocker (red is space) reset_all Factory reset and reboot reset_channels Delete all channels reset_confirm Are you sure ? +reset_removed Delete removed channels reset_settings Reset settings to defaults satsetup.auto_scan Auto-Scan selected %s satsetup.auto_scan_all Auto-Scan multiple Satellites diff --git a/src/neutrino_menue.cpp b/src/neutrino_menue.cpp index 4c4670801..9e815c6ff 100644 --- a/src/neutrino_menue.cpp +++ b/src/neutrino_menue.cpp @@ -380,6 +380,10 @@ void CNeutrinoApp::InitMenuService() mf = new CMenuForwarder(LOCALE_RESET_CHANNELS , true, NULL, resetNotifier, "channels", CRCInput::RC_blue, NEUTRINO_ICON_BUTTON_BLUE); mf->setHint(NEUTRINO_ICON_HINT_DELETE_CHANNELS, LOCALE_MENU_HINT_DELETE_CHANNELS); personalize.addItem(MENU_SERVICE, mf, &g_settings.personalize[SNeutrinoSettings::P_MSER_RESET_CHANNELS]); + /* todo: only show if (g_settings.make_removed_list) */ + mf = new CMenuForwarder(LOCALE_RESET_REMOVED, true, NULL, resetNotifier, "delete_removed"); + mf->setHint(NEUTRINO_ICON_HINT_DELETE_CHANNELS, LOCALE_MENU_HINT_DELETE_REMOVED); + personalize.addItem(MENU_SERVICE, mf, &g_settings.personalize[SNeutrinoSettings::P_MSER_RESET_CHANNELS]); //separator personalize.addSeparator(MENU_SERVICE); diff --git a/src/system/locals.h b/src/system/locals.h index ff91cd063..970327326 100644 --- a/src/system/locals.h +++ b/src/system/locals.h @@ -787,6 +787,7 @@ typedef enum LOCALE_MENU_HINT_CONTRAST_FONTS, LOCALE_MENU_HINT_DBOXINFO, LOCALE_MENU_HINT_DELETE_CHANNELS, + LOCALE_MENU_HINT_DELETE_REMOVED, LOCALE_MENU_HINT_EPG_CACHE, LOCALE_MENU_HINT_EPG_DIR, LOCALE_MENU_HINT_EPG_EXTENDEDCACHE, @@ -1598,6 +1599,7 @@ typedef enum LOCALE_RESET_ALL, LOCALE_RESET_CHANNELS, LOCALE_RESET_CONFIRM, + LOCALE_RESET_REMOVED, LOCALE_RESET_SETTINGS, LOCALE_SATSETUP_AUTO_SCAN, LOCALE_SATSETUP_AUTO_SCAN_ALL, diff --git a/src/system/locals_intern.h b/src/system/locals_intern.h index 699a22f1d..909e97512 100644 --- a/src/system/locals_intern.h +++ b/src/system/locals_intern.h @@ -787,6 +787,7 @@ const char * locale_real_names[] = "menu.hint_contrast_fonts", "menu.hint_dboxinfo", "menu.hint_delete_channels", + "menu.hint_delete_removed", "menu.hint_epg_cache", "menu.hint_epg_dir", "menu.hint_epg_extendedcache", @@ -1598,6 +1599,7 @@ const char * locale_real_names[] = "reset_all", "reset_channels", "reset_confirm", + "reset_removed", "reset_settings", "satsetup.auto_scan", "satsetup.auto_scan_all", diff --git a/src/system/setting_helpers.cpp b/src/system/setting_helpers.cpp index 0f72c2050..11db59364 100644 --- a/src/system/setting_helpers.cpp +++ b/src/system/setting_helpers.cpp @@ -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; }