diff --git a/data/locale/deutsch.locale b/data/locale/deutsch.locale index eedb16d9a..9ce69a80e 100644 --- a/data/locale/deutsch.locale +++ b/data/locale/deutsch.locale @@ -1399,6 +1399,7 @@ timing.filebrowser Filebrowser timing.hint_1 Einblendzeit in Sek., die das OSD timing.hint_2 auf dem TV angezeigt wird timing.infobar Infobar +timing.infobar_radio Infobar (Radiobetrieb) timing.menu MenĂ¼ timing.numericzap Umschalten mit Zifferntasten ucodecheck.avia500 Avia 500 diff --git a/data/locale/english.locale b/data/locale/english.locale index 1ba50e233..c0ec445c5 100644 --- a/data/locale/english.locale +++ b/data/locale/english.locale @@ -1399,6 +1399,7 @@ timing.filebrowser Filebrowser timing.hint_1 Time in sec. After this time the timing.hint_2 infobar will be faded out. timing.infobar Infobar +timing.infobar_radio Infobar (radio mode) timing.menu Menu timing.numericzap Numeric Zap ucodecheck.avia500 Avia 500 diff --git a/src/gui/infoviewer.cpp b/src/gui/infoviewer.cpp index dde7006de..1a5be4622 100644 --- a/src/gui/infoviewer.cpp +++ b/src/gui/infoviewer.cpp @@ -759,9 +759,24 @@ void CInfoViewer::loop(int fadeValue, bool show_dot ,bool fadeIn) { bool hideIt = true; virtual_zap_mode = false; - uint64_t timeoutEnd = CRCInput::calcTimeoutEnd (g_settings.timing[SNeutrinoSettings::TIMING_INFOBAR] == 0 ? 0xFFFF : g_settings.timing[SNeutrinoSettings::TIMING_INFOBAR]); bool fadeOut = false; - + uint64_t timeoutEnd; + int mode = CNeutrinoApp::getInstance()->getMode(); + + //define timeouts + switch (mode) + { + case NeutrinoMessages::mode_tv: + timeoutEnd = CRCInput::calcTimeoutEnd (g_settings.timing[SNeutrinoSettings::TIMING_INFOBAR] == 0 ? 0xFFFF : g_settings.timing[SNeutrinoSettings::TIMING_INFOBAR]); + break; + case NeutrinoMessages::mode_radio: + timeoutEnd = CRCInput::calcTimeoutEnd (g_settings.timing[SNeutrinoSettings::TIMING_INFOBAR_RADIO] == 0 ? 0xFFFF : g_settings.timing[SNeutrinoSettings::TIMING_INFOBAR_RADIO]); + break; + default: + timeoutEnd = CRCInput::calcTimeoutEnd(6); + break; + } + int res = messages_return::none; neutrino_msg_t msg; neutrino_msg_data_t data; diff --git a/src/gui/osd_setup.cpp b/src/gui/osd_setup.cpp index f30acb08c..79821676d 100644 --- a/src/gui/osd_setup.cpp +++ b/src/gui/osd_setup.cpp @@ -156,8 +156,8 @@ int COsdSetup::exec(CMenuTarget* parent, const std::string &actionKey) return menu_return::RETURN_REPAINT; } else if(actionKey=="osd.def") { - for (int i = 0; i < TIMING_SETTING_COUNT; i++) - g_settings.timing[i] = default_timing[i]; + for (int i = 0; i < SNeutrinoSettings::TIMING_SETTING_COUNT; i++) + g_settings.timing[i] = timing_setting[i].default_timing; CNeutrinoApp::getInstance()->SetupTiming(); return menu_return::RETURN_REPAINT; @@ -537,10 +537,10 @@ void COsdSetup::showOsdTimeoutSetup(CMenuWidget* menu_timeout) { menu_timeout->addIntroItems(LOCALE_COLORMENU_TIMING); - for (int i = 0; i < TIMING_SETTING_COUNT; i++) + for (int i = 0; i < SNeutrinoSettings::TIMING_SETTING_COUNT; i++) { - CStringInput * timing_item = new CStringInput(timing_setting_name[i], g_settings.timing_string[i], 3, LOCALE_TIMING_HINT_1, LOCALE_TIMING_HINT_2, "0123456789 ", &timingsettingsnotifier); - menu_timeout->addItem(new CMenuForwarder(timing_setting_name[i], true, g_settings.timing_string[i], timing_item)); + CStringInput * timing_item = new CStringInput(timing_setting[i].name, g_settings.timing_string[i], 3, LOCALE_TIMING_HINT_1, LOCALE_TIMING_HINT_2, "0123456789 ", &timingsettingsnotifier); + menu_timeout->addItem(new CMenuForwarder(timing_setting[i].name, true, g_settings.timing_string[i], timing_item)); } menu_timeout->addItem(GenericMenuSeparatorLine); diff --git a/src/neutrino.cpp b/src/neutrino.cpp index bf1221944..324d1234d 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -756,8 +756,8 @@ printf("***************************** rec dir %s timeshift dir %s\n", g_settings } strcpy( g_settings.parentallock_pincode, configfile.getString( "parentallock_pincode", "0000" ).c_str() ); - for (int i = 0; i < TIMING_SETTING_COUNT; i++) - g_settings.timing[i] = configfile.getInt32(locale_real_names[timing_setting_name[i]], default_timing[i]); + for (int i = 0; i < SNeutrinoSettings::TIMING_SETTING_COUNT; i++) + g_settings.timing[i] = configfile.getInt32(locale_real_names[timing_setting[i].name], timing_setting[i].default_timing); for (int i = 0; i < SNeutrinoSettings::LCD_SETTING_COUNT; i++) g_settings.lcd_setting[i] = configfile.getInt32(lcd_setting[i].name, lcd_setting[i].default_value); @@ -1271,8 +1271,8 @@ void CNeutrinoApp::saveSetup(const char * fname) configfile.setString( "parentallock_pincode", g_settings.parentallock_pincode ); //timing - for (int i = 0; i < TIMING_SETTING_COUNT; i++) - configfile.setInt32(locale_real_names[timing_setting_name[i]], g_settings.timing[i]); + for (int i = 0; i < SNeutrinoSettings::TIMING_SETTING_COUNT; i++) + configfile.setInt32(locale_real_names[timing_setting[i].name], g_settings.timing[i]); for (int i = 0; i < SNeutrinoSettings::LCD_SETTING_COUNT; i++) configfile.setInt32(lcd_setting[i].name, g_settings.lcd_setting[i]); @@ -1758,7 +1758,7 @@ void CNeutrinoApp::SetupFonts() **************************************************************************************/ void CNeutrinoApp::SetupTiming() { - for (int i = 0; i < TIMING_SETTING_COUNT; i++) + for (int i = 0; i < SNeutrinoSettings::TIMING_SETTING_COUNT; i++) sprintf(g_settings.timing_string[i], "%d", g_settings.timing[i]); } diff --git a/src/system/locals.h b/src/system/locals.h index 91c00421d..0d45669e1 100644 --- a/src/system/locals.h +++ b/src/system/locals.h @@ -1426,6 +1426,7 @@ typedef enum LOCALE_TIMING_HINT_1, LOCALE_TIMING_HINT_2, LOCALE_TIMING_INFOBAR, + LOCALE_TIMING_INFOBAR_RADIO, LOCALE_TIMING_MENU, LOCALE_TIMING_NUMERICZAP, LOCALE_UCODECHECK_AVIA500, diff --git a/src/system/locals_intern.h b/src/system/locals_intern.h index 3357acb18..51cabe90b 100644 --- a/src/system/locals_intern.h +++ b/src/system/locals_intern.h @@ -1426,6 +1426,7 @@ const char * locale_real_names[] = "timing.hint_1", "timing.hint_2", "timing.infobar", + "timing.infobar_radio", "timing.menu", "timing.numericzap", "ucodecheck.avia500", diff --git a/src/system/setting_helpers.cpp b/src/system/setting_helpers.cpp index fce57b4f5..1e963f233 100644 --- a/src/system/setting_helpers.cpp +++ b/src/system/setting_helpers.cpp @@ -566,9 +566,9 @@ bool CConsoleDestChangeNotifier::changeNotify(const neutrino_locale_t, void * Da bool CTimingSettingsNotifier::changeNotify(const neutrino_locale_t OptionName, void *) { - for (int i = 0; i < TIMING_SETTING_COUNT; i++) + for (int i = 0; i < SNeutrinoSettings::TIMING_SETTING_COUNT; i++) { - if (ARE_LOCALES_EQUAL(OptionName, timing_setting_name[i])) + if (ARE_LOCALES_EQUAL(OptionName, timing_setting[i].name)) { g_settings.timing[i] = atoi(g_settings.timing_string[i]); return true; diff --git a/src/system/settings.cpp b/src/system/settings.cpp index 9696ae1a7..773414cdf 100644 --- a/src/system/settings.cpp +++ b/src/system/settings.cpp @@ -27,27 +27,6 @@ #include #include -const int default_timing[TIMING_SETTING_COUNT] = -{ - 0, - 60, - 240, - 6, - 60, - 3 -}; - -const neutrino_locale_t timing_setting_name[TIMING_SETTING_COUNT] = -{ - LOCALE_TIMING_MENU, - LOCALE_TIMING_CHANLIST, - LOCALE_TIMING_EPG, - LOCALE_TIMING_INFOBAR, - LOCALE_TIMING_FILEBROWSER, - LOCALE_TIMING_NUMERICZAP -}; - - CScanSettings::CScanSettings(void) : configfile('\t') { diff --git a/src/system/settings.h b/src/system/settings.h index 32b7896a4..8ee4ffc03 100644 --- a/src/system/settings.h +++ b/src/system/settings.h @@ -129,14 +129,18 @@ struct SNeutrinoSettings char ifname[10]; //timing -#define TIMING_SETTING_COUNT 6 enum TIMING_SETTINGS { TIMING_MENU = 0, TIMING_CHANLIST = 1, TIMING_EPG = 2, TIMING_INFOBAR = 3, - TIMING_FILEBROWSER = 4, - TIMING_NUMERICZAP = 5 + TIMING_INFOBAR_RADIO = 4, +// TIMING_INFOBAR_MOVIEPLAYER, +// TIMING_VOLUMEBAR, + TIMING_FILEBROWSER = 5, + TIMING_NUMERICZAP = 6, + + TIMING_SETTING_COUNT }; int timing [TIMING_SETTING_COUNT] ; @@ -513,8 +517,24 @@ struct SNeutrinoSettings /* some default Values */ -extern const int default_timing [TIMING_SETTING_COUNT]; -extern const neutrino_locale_t timing_setting_name[TIMING_SETTING_COUNT]; +typedef struct time_settings_t +{ + const int default_timing; + const neutrino_locale_t name; +} time_settings_struct_t; + +const time_settings_struct_t timing_setting[SNeutrinoSettings::TIMING_SETTING_COUNT] = +{ + { 0, LOCALE_TIMING_MENU }, + { 60, LOCALE_TIMING_CHANLIST }, + { 240, LOCALE_TIMING_EPG }, + { 6, LOCALE_TIMING_INFOBAR }, + { 0, LOCALE_TIMING_INFOBAR_RADIO }, +// { 6, LOCALE_TIMING_INFOBAR_MOVIEPLAYER}, +// { 3, LOCALE_TIMING_VOLUMEBAR }, + { 60, LOCALE_TIMING_FILEBROWSER }, + { 3, LOCALE_TIMING_NUMERICZAP } +}; // lcdd #define DEFAULT_VFD_BRIGHTNESS 15 @@ -543,6 +563,7 @@ extern const neutrino_locale_t timing_setting_name[TIMING_SETTING_COUNT]; /* end default values */ + struct SglobalInfo { unsigned char box_Type;