infobar: rework infobar timeout behavior

Options were sometimes described ambiguously and previous behavior was no longer available.
Now the descriptions should be more plausible for current behavior.


Origin commit data
------------------
Commit: 89770bae19
Author: Thilo Graf <dbt@novatux.de>
Date: 2018-04-10 (Tue, 10 Apr 2018)
This commit is contained in:
2018-04-10 22:30:17 +02:00
committed by vanhofen
parent 7d0e5cff05
commit a123753eaa
12 changed files with 94 additions and 41 deletions

View File

@@ -914,6 +914,9 @@ int CNeutrinoApp::loadSetup(const char * fname)
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::HANDLING_INFOBAR_SETTING_COUNT; i++)
g_settings.handling_infobar[i] = configfile.getInt32(locale_real_names[handling_infobar_setting[i].name], handling_infobar_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);
g_settings.lcd_setting_dim_time = configfile.getString("lcd_dim_time","0");
@@ -1621,6 +1624,10 @@ void CNeutrinoApp::saveSetup(const char * fname)
for (int i = 0; i < SNeutrinoSettings::TIMING_SETTING_COUNT; i++)
configfile.setInt32(locale_real_names[timing_setting[i].name], g_settings.timing[i]);
//timing/handling infobar
for (int i = 0; i < SNeutrinoSettings::HANDLING_INFOBAR_SETTING_COUNT; i++)
configfile.setInt32(locale_real_names[handling_infobar_setting[i].name], g_settings.handling_infobar[i]);
for (int i = 0; i < SNeutrinoSettings::LCD_SETTING_COUNT; i++)
configfile.setInt32(lcd_setting[i].name, g_settings.lcd_setting[i]);
configfile.setString("lcd_dim_time", g_settings.lcd_setting_dim_time);
@@ -3077,8 +3084,8 @@ void CNeutrinoApp::RealRun()
( msg == NeutrinoMessages::SHOW_INFOBAR ) )
{
bool enabled_by_timing = (
((mode == NeutrinoModes::mode_tv || mode == NeutrinoModes::mode_webtv) && g_settings.timing[SNeutrinoSettings::TIMING_INFOBAR] != 0)
|| ((mode == NeutrinoModes::mode_radio || mode == NeutrinoModes::mode_webradio) && g_settings.timing[SNeutrinoSettings::TIMING_INFOBAR_RADIO] != 0)
((mode == NeutrinoModes::mode_tv || mode == NeutrinoModes::mode_webtv) && g_settings.handling_infobar[SNeutrinoSettings::HANDLING_INFOBAR] != 0) ||
((mode == NeutrinoModes::mode_radio || mode == NeutrinoModes::mode_webradio) && g_settings.handling_infobar[SNeutrinoSettings::HANDLING_INFOBAR_RADIO] != 0)
);
bool show_info = ((msg != NeutrinoMessages::SHOW_INFOBAR) || (g_InfoViewer->is_visible || enabled_by_timing));
@@ -5523,6 +5530,7 @@ static struct __key_rename key_rename[] = {
{ NULL, NULL }
};
/* actually do the migration of the config entries */
void CNeutrinoApp::migrateConfig(const char *fname)
{