From d6cb1d206f9535c7c9db634e9da8cc36997f94e0 Mon Sep 17 00:00:00 2001 From: svenhoefer Date: Mon, 14 Nov 2016 22:58:43 +0100 Subject: [PATCH] - followscreenings: allow to turn off followscreenings list --- data/locale/deutsch.locale | 2 ++ data/locale/english.locale | 2 ++ src/gui/followscreenings.cpp | 9 +++++---- src/gui/record_setup.cpp | 7 +++++++ src/neutrino.cpp | 2 ++ src/system/locals.h | 2 ++ src/system/locals_intern.h | 2 ++ src/system/settings.h | 1 + 8 files changed, 23 insertions(+), 4 deletions(-) diff --git a/data/locale/deutsch.locale b/data/locale/deutsch.locale index c3de46465..60122e160 100644 --- a/data/locale/deutsch.locale +++ b/data/locale/deutsch.locale @@ -1429,6 +1429,7 @@ menu.hint_subchannel_pos Wählen Sie die Anzeigeposition der Unterkanäle aus menu.hint_sw_update Neutrino-HD aktualisieren, Image sichern und wiederherstellen menu.hint_theme Wählen Sie ein vordefiniertes Farbschema, speichern oder laden Sie ihre eigenen Farbschemata menu.hint_timeouts Gibt an, nach welcher Zeit in Sekunden die Menüs oder Infofenster sich automatisch schließen (0 deaktiviert) +menu.hint_timer_followscreenings Zeige Terminauswahl mit Folge-Events zur Timerprogrammierung menu.hint_timers Hinzufügen, entfernen und bearbeiten geplanter Aufnahmen oder anderer Timer menu.hint_timezone Wählen Sie ihre Zeitzone aus menu.hint_tmdb_api_key Geben Sie den TMDb API Schlüssel ein. Eine leere Eingabe schaltet die TMDb-Unterstützung aus @@ -2381,6 +2382,7 @@ timerlist.type.zapto Umschalten timerlist.weekdays Wochentage timerlist.weekdays.hint_1 Mo Di Mi Do Fr Sa So timerlist.weekdays.hint_2 'X'=Timer '-' kein Timer +timersettings.followscreenings Zeige Terminauswahl timersettings.record_safety_time_after Aufnahmeende-Korrektur timersettings.record_safety_time_after.hint_1 Korrekturzeit in Min. (00=aus), die auf die End- timersettings.record_safety_time_after.hint_2 zeit des jeweiligen Timers addiert wird diff --git a/data/locale/english.locale b/data/locale/english.locale index ed16dddb2..5650de51b 100644 --- a/data/locale/english.locale +++ b/data/locale/english.locale @@ -1429,6 +1429,7 @@ menu.hint_subchannel_pos Select subchannels menu position menu.hint_sw_update Update software menu.hint_theme Select pre-defined color theme\nSave or load theme from files menu.hint_timeouts Configure time to hide GUI windows\nin seconds +menu.hint_timer_followscreenings Show selection with followscreenings for timer programming menu.hint_timers Add/Remove/Edit scheduled\nrecording, reminders etc. menu.hint_timezone Select your timezone menu.hint_tmdb_api_key Type your TMDb API key. An empty input disables TMDb support @@ -2381,6 +2382,7 @@ timerlist.type.zapto Zap to timerlist.weekdays Days of the week timerlist.weekdays.hint_1 Mo Tu We Th Fr Sa Su timerlist.weekdays.hint_2 'X'=timer '-' no timer +timersettings.followscreenings Show screening selection timersettings.record_safety_time_after Record stop time correction timersettings.record_safety_time_after.hint_1 Correction time in min. (00=off). This time timersettings.record_safety_time_after.hint_2 will added to stop time of every record timer. diff --git a/src/gui/followscreenings.cpp b/src/gui/followscreenings.cpp index f8a63edf0..8514a5b53 100644 --- a/src/gui/followscreenings.cpp +++ b/src/gui/followscreenings.cpp @@ -66,6 +66,9 @@ CChannelEventList *CFollowScreenings::getFollowScreenings(void) if (e->description != title) continue; followlist.push_back(*e); + + if (followlist.size() == 1 && !g_settings.timer_followscreenings) + break; } } return &followlist; @@ -87,7 +90,7 @@ int CFollowScreenings::exec(CMenuTarget* /*parent*/, const std::string & actionK if (i->eventType == CTimerd::TIMER_RECORD) { if (channel_id == i->channel_id && e->startTime == i->epg_starttime) { Timer.removeTimerEvent(i->eventID); - if (!forwarders.empty()) + if (!forwarders.empty() && followlist.size() > 1) forwarders[ix]->iconName_Info_right = ""; #if 0 else @@ -106,13 +109,11 @@ int CFollowScreenings::exec(CMenuTarget* /*parent*/, const std::string & actionK e->startTime, e->startTime - (ANNOUNCETIME + 120 ), apids, true, e->startTime - (ANNOUNCETIME + 120) > time(NULL), recDir, true) == -1) { //FIXME -- no error handling, but this shouldn't happen ... } else { - if (!forwarders.empty()) + if (!forwarders.empty() && followlist.size() > 1) forwarders[ix]->iconName_Info_right = NEUTRINO_ICON_REC; -#if 0 else ShowMsg(LOCALE_TIMER_EVENTRECORD_TITLE, LOCALE_TIMER_EVENTRECORD_MSG, CMessageBox::mbrBack, CMessageBox::mbBack, NEUTRINO_ICON_INFO); -#endif return menu_return::RETURN_REPAINT; } break; // for diff --git a/src/gui/record_setup.cpp b/src/gui/record_setup.cpp index 89a5c714d..e788f2da0 100644 --- a/src/gui/record_setup.cpp +++ b/src/gui/record_setup.cpp @@ -338,6 +338,13 @@ void CRecordSetup::showRecordTimerSetup(CMenuWidget *menu_timersettings) ch->setHint("", LOCALE_MENU_HINT_RECORD_ZAP_PRE_TIME); ch->setNumberFormat(nf); menu_timersettings->addItem(ch); + + menu_timersettings->addItem(GenericMenuSeparatorLine); + + //allow followscreenings + CMenuOptionChooser* followscreenings = new CMenuOptionChooser(LOCALE_TIMERSETTINGS_FOLLOWSCREENINGS, &g_settings.timer_followscreenings, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true); + followscreenings->setHint("", LOCALE_MENU_HINT_TIMER_FOLLOWSCREENINGS); + menu_timersettings->addItem(followscreenings); } diff --git a/src/neutrino.cpp b/src/neutrino.cpp index a82795d94..4c5b09fc8 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -481,6 +481,7 @@ int CNeutrinoApp::loadSetup(const char * fname) g_settings.timer_remotebox_ip.push_back(timer_rb); } } + g_settings.timer_followscreenings = configfile.getInt32( "timer_followscreenings", 1 ); g_settings.infobar_sat_display = configfile.getBool("infobar_sat_display" , true ); g_settings.infobar_show_channeldesc = configfile.getBool("infobar_show_channeldesc" , false ); @@ -1084,6 +1085,7 @@ void CNeutrinoApp::saveSetup(const char * fname) timer_remotebox_itemcount++; } configfile.setInt32 ( "timer_remotebox_ip_count", g_settings.timer_remotebox_ip.size()); + configfile.setInt32 ("timer_followscreenings", g_settings.timer_followscreenings); configfile.setBool("infobar_sat_display" , g_settings.infobar_sat_display ); configfile.setBool("infobar_show_channeldesc" , g_settings.infobar_show_channeldesc ); diff --git a/src/system/locals.h b/src/system/locals.h index cf4336a52..993edda05 100644 --- a/src/system/locals.h +++ b/src/system/locals.h @@ -1456,6 +1456,7 @@ typedef enum LOCALE_MENU_HINT_SW_UPDATE, LOCALE_MENU_HINT_THEME, LOCALE_MENU_HINT_TIMEOUTS, + LOCALE_MENU_HINT_TIMER_FOLLOWSCREENINGS, LOCALE_MENU_HINT_TIMERS, LOCALE_MENU_HINT_TIMEZONE, LOCALE_MENU_HINT_TMDB_API_KEY, @@ -2408,6 +2409,7 @@ typedef enum LOCALE_TIMERLIST_WEEKDAYS, LOCALE_TIMERLIST_WEEKDAYS_HINT_1, LOCALE_TIMERLIST_WEEKDAYS_HINT_2, + LOCALE_TIMERSETTINGS_FOLLOWSCREENINGS, LOCALE_TIMERSETTINGS_RECORD_SAFETY_TIME_AFTER, LOCALE_TIMERSETTINGS_RECORD_SAFETY_TIME_AFTER_HINT_1, LOCALE_TIMERSETTINGS_RECORD_SAFETY_TIME_AFTER_HINT_2, diff --git a/src/system/locals_intern.h b/src/system/locals_intern.h index da28b20bd..a062a9823 100644 --- a/src/system/locals_intern.h +++ b/src/system/locals_intern.h @@ -1456,6 +1456,7 @@ const char * locale_real_names[] = "menu.hint_sw_update", "menu.hint_theme", "menu.hint_timeouts", + "menu.hint_timer_followscreenings", "menu.hint_timers", "menu.hint_timezone", "menu.hint_tmdb_api_key", @@ -2408,6 +2409,7 @@ const char * locale_real_names[] = "timerlist.weekdays", "timerlist.weekdays.hint_1", "timerlist.weekdays.hint_2", + "timersettings.followscreenings", "timersettings.record_safety_time_after", "timersettings.record_safety_time_after.hint_1", "timersettings.record_safety_time_after.hint_2", diff --git a/src/system/settings.h b/src/system/settings.h index bf67d66fc..c95d2f25b 100644 --- a/src/system/settings.h +++ b/src/system/settings.h @@ -460,6 +460,7 @@ struct SNeutrinoSettings int recording_startstop_msg; int shutdown_timer_record_type; std::vector timer_remotebox_ip; + int timer_followscreenings; std::string recording_filename_template; int recording_already_found_check;