From ae2a01a37a1bdc3eb9d8c6197ad3c609ba069657 Mon Sep 17 00:00:00 2001 From: "[priv] M. Liebmann" Date: Mon, 13 Jan 2014 19:39:41 +0100 Subject: [PATCH] CRecordInstance: Turns message when recording start/end on or off --- data/locale/deutsch.locale | 2 ++ data/locale/english.locale | 2 ++ src/driver/record.cpp | 4 ++-- src/gui/record_setup.cpp | 4 ++++ src/neutrino.cpp | 2 ++ src/system/locals.h | 2 ++ src/system/locals_intern.h | 2 ++ src/system/settings.h | 1 + 8 files changed, 17 insertions(+), 2 deletions(-) diff --git a/data/locale/deutsch.locale b/data/locale/deutsch.locale index 14501d999..73e47824d 100644 --- a/data/locale/deutsch.locale +++ b/data/locale/deutsch.locale @@ -1041,6 +1041,7 @@ menu.hint_record_data_vtxt Teletext-Spur zu Aufnahme hinzufügen menu.hint_record_dir Wählen Sie das Aufnahmeverzeichnis menu.hint_record_end Wählen Sie zwischen maximaler Aufnahmezeit oder einem Aufnahmeende anhand der EPG-Daten menu.hint_record_slow_warn Zeige Warnung, wenn der Aufnahmepuffer zu überlaufen droht +menu.hint_record_startstop_msg Schaltet die Meldung bei Aufnahmestart/ende ein oder aus. menu.hint_record_tdir Wählen Sie ein Verzeichnis für Ihre Timeshift-Aufnahmen im temporären Timeshift-Modus menu.hint_record_time Geben Sie eine maximale Aufnahmezeit in Stunden ein, wenn Sie die Aufnahme nicht vorzeitig stoppen menu.hint_record_timeafter Stellen Sie die Nachlaufzeit für Timer-Aufnahmen ein\nEin Wert von 2 beendet die Aufnahme 2 Minuten nach dem Sendungsende @@ -1657,6 +1658,7 @@ rclock.title Fernbedienung sperren rclock.unlockmsg Fernbedienung reaktiviert... recording.is_running Folgende Aufnahme läuft bereits! Neue Aufnahme starten? recording.start Starte Aufnahme, bitte warten...! +recording.startstop_msg Meldung bei Aufnahme Start/Ende recording.stop Beende Aufnahme, bitte warten...! recording.time_hour Stunde recording.time_hours Stunden diff --git a/data/locale/english.locale b/data/locale/english.locale index b4a44d5f8..0bb1c71df 100644 --- a/data/locale/english.locale +++ b/data/locale/english.locale @@ -1041,6 +1041,7 @@ menu.hint_record_data_vtxt VideoText stream menu.hint_record_dir Select directory to store recordings menu.hint_record_end Stop direct record after maximal time or after current event end time menu.hint_record_slow_warn Show warning, when record buffer is close to overflow +menu.hint_record_startstop_msg Turns the message when recording start/end on or off. menu.hint_record_tdir Select directory to save timeshift recordings\nin temporary timeshift mode menu.hint_record_time Record time before stop when\nusing direct record with record button menu.hint_record_timeafter Stop record after event end\nin minutes @@ -1657,6 +1658,7 @@ rclock.title Lock Remote Control rclock.unlockmsg Remote control reactivated. recording.is_running This channel already recording. Start new record? recording.start Start recording, please wait...! +recording.startstop_msg Message when recording is start/stop recording.stop Stop recording, please wait...! recording.time_hour hour recording.time_hours hours diff --git a/src/driver/record.cpp b/src/driver/record.cpp index 97bd2e251..8ba915f9d 100644 --- a/src/driver/record.cpp +++ b/src/driver/record.cpp @@ -146,7 +146,7 @@ record_error_msg_t CRecordInstance::Start(CZapitChannel * channel) time_t msg_start_time = time(0); CHintBox hintBox(LOCALE_MESSAGEBOX_INFO, g_Locale->getText(LOCALE_RECORDING_START)); - if (!(autoshift && g_settings.auto_timeshift)) + if ((!(autoshift && g_settings.auto_timeshift)) && g_settings.recording_startstop_msg) hintBox.paint(); tsfile = std::string(filename) + ".ts"; @@ -253,7 +253,7 @@ bool CRecordInstance::Stop(bool remove_event) recMovieInfo->length = (int) round((double) (end_time - start_time) / (double) 60); CHintBox hintBox(LOCALE_MESSAGEBOX_INFO, rec_stop_msg.c_str()); - if (!(autoshift && g_settings.auto_timeshift)) + if ((!(autoshift && g_settings.auto_timeshift)) && g_settings.recording_startstop_msg) hintBox.paint(); printf("%s: channel %" PRIx64 " recording_id %d\n", __func__, channel_id, recording_id); diff --git a/src/gui/record_setup.cpp b/src/gui/record_setup.cpp index 7349c9ac2..4651df1a9 100644 --- a/src/gui/record_setup.cpp +++ b/src/gui/record_setup.cpp @@ -231,6 +231,10 @@ int CRecordSetup::showRecordSetup() CMenuOptionChooser* slow_warn = new CMenuOptionChooser(LOCALE_RECORDINGMENU_SLOW_WARN, &g_settings.recording_slow_warning, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true); slow_warn->setHint("", LOCALE_MENU_HINT_RECORD_SLOW_WARN); recordingSettings->addItem(slow_warn); + + CMenuOptionChooser* startstop_msg = new CMenuOptionChooser(LOCALE_RECORDING_STARTSTOP_MSG, &g_settings.recording_startstop_msg, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true); + startstop_msg->setHint("", LOCALE_MENU_HINT_RECORD_STARTSTOP_MSG); + recordingSettings->addItem(startstop_msg); } //template diff --git a/src/neutrino.cpp b/src/neutrino.cpp index 3ef60554f..b51d9e658 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -603,6 +603,7 @@ int CNeutrinoApp::loadSetup(const char * fname) g_settings.recording_epg_for_end = configfile.getBool("recording_epg_for_end" , true); g_settings.recording_save_in_channeldir = configfile.getBool("recording_save_in_channeldir" , false); g_settings.recording_slow_warning = configfile.getBool("recording_slow_warning" , true); + g_settings.recording_startstop_msg = configfile.getBool("recording_startstop_msg" , true); // default plugin for movieplayer g_settings.movieplayer_plugin = configfile.getString( "movieplayer_plugin", "Teletext" ); @@ -1079,6 +1080,7 @@ void CNeutrinoApp::saveSetup(const char * fname) configfile.setBool ("recording_epg_for_end" , g_settings.recording_epg_for_end ); configfile.setBool ("recording_save_in_channeldir" , g_settings.recording_save_in_channeldir ); configfile.setBool ("recording_slow_warning" , g_settings.recording_slow_warning ); + configfile.setBool ("recording_startstop_msg" , g_settings.recording_startstop_msg ); // default plugin for movieplayer configfile.setString ( "movieplayer_plugin", g_settings.movieplayer_plugin ); diff --git a/src/system/locals.h b/src/system/locals.h index 1f9308dc3..f39eae2a9 100644 --- a/src/system/locals.h +++ b/src/system/locals.h @@ -1068,6 +1068,7 @@ typedef enum LOCALE_MENU_HINT_RECORD_DIR, LOCALE_MENU_HINT_RECORD_END, LOCALE_MENU_HINT_RECORD_SLOW_WARN, + LOCALE_MENU_HINT_RECORD_STARTSTOP_MSG, LOCALE_MENU_HINT_RECORD_TDIR, LOCALE_MENU_HINT_RECORD_TIME, LOCALE_MENU_HINT_RECORD_TIMEAFTER, @@ -1684,6 +1685,7 @@ typedef enum LOCALE_RCLOCK_UNLOCKMSG, LOCALE_RECORDING_IS_RUNNING, LOCALE_RECORDING_START, + LOCALE_RECORDING_STARTSTOP_MSG, LOCALE_RECORDING_STOP, LOCALE_RECORDING_TIME_HOUR, LOCALE_RECORDING_TIME_HOURS, diff --git a/src/system/locals_intern.h b/src/system/locals_intern.h index d662757fa..e967782e2 100644 --- a/src/system/locals_intern.h +++ b/src/system/locals_intern.h @@ -1068,6 +1068,7 @@ const char * locale_real_names[] = "menu.hint_record_dir", "menu.hint_record_end", "menu.hint_record_slow_warn", + "menu.hint_record_startstop_msg", "menu.hint_record_tdir", "menu.hint_record_time", "menu.hint_record_timeafter", @@ -1684,6 +1685,7 @@ const char * locale_real_names[] = "rclock.unlockmsg", "recording.is_running", "recording.start", + "recording.startstop_msg", "recording.stop", "recording.time_hour", "recording.time_hours", diff --git a/src/system/settings.h b/src/system/settings.h index 7250f64a8..6eb960b76 100644 --- a/src/system/settings.h +++ b/src/system/settings.h @@ -362,6 +362,7 @@ struct SNeutrinoSettings int recording_save_in_channeldir; int recording_zap_on_announce; int recording_slow_warning; + int recording_startstop_msg; int shutdown_timer_record_type; int filesystem_is_utf8;