diff --git a/data/locale/deutsch.locale b/data/locale/deutsch.locale index e2bb33dfe..a9e00d8ec 100644 --- a/data/locale/deutsch.locale +++ b/data/locale/deutsch.locale @@ -759,6 +759,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 @@ -1560,6 +1561,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 c805924e1..2a18b0911 100644 --- a/data/locale/english.locale +++ b/data/locale/english.locale @@ -759,6 +759,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 @@ -1560,6 +1561,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 d935baf1d..c790dea55 100644 --- a/src/neutrino_menue.cpp +++ b/src/neutrino_menue.cpp @@ -378,6 +378,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 7718abca1..9a4ddd5a1 100644 --- a/src/system/locals.h +++ b/src/system/locals.h @@ -786,6 +786,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, @@ -1587,6 +1588,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 086306766..4d15e3c97 100644 --- a/src/system/locals_intern.h +++ b/src/system/locals_intern.h @@ -786,6 +786,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", @@ -1587,6 +1588,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 e959dd875..6f8b6d902 100644 --- a/src/system/setting_helpers.cpp +++ b/src/system/setting_helpers.cpp @@ -460,12 +460,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"); @@ -491,6 +495,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; }