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

@@ -368,6 +368,9 @@ int COsdSetup::exec(CMenuTarget* parent, const std::string &actionKey)
return res;
}
else if(actionKey=="osd.def") {
for (int i = 0; i < SNeutrinoSettings::HANDLING_INFOBAR_SETTING_COUNT; i++)
g_settings.handling_infobar[i] = handling_infobar_setting[i].default_timing;
for (int i = 0; i < SNeutrinoSettings::TIMING_SETTING_COUNT; i++)
g_settings.timing[i] = timing_setting[i].default_timing;
return res;
@@ -1118,16 +1121,28 @@ void COsdSetup::showOsdTimeoutSetup(CMenuWidget* menu_timeout)
std::string nf("%d ");
nf += g_Locale->getText(LOCALE_UNIT_SHORT_SECOND);
CMenuOptionNumberChooser *ch = NULL;
for (int i = 0; i < SNeutrinoSettings::TIMING_SETTING_COUNT; i++)
{
CMenuOptionNumberChooser *ch = new CMenuOptionNumberChooser(timing_setting[i].name, &g_settings.timing[i], true, 0, 240);
ch = new CMenuOptionNumberChooser(timing_setting[i].name, &g_settings.timing[i], true, 0, 240);
ch->setNumberFormat(nf);
ch->setLocalizedValue(0, LOCALE_OPTIONS_OFF);
ch->setLocalizedValue(0, LOCALE_TIMING_OFF);
ch->setHint("", timing_setting[i].hint);
menu_timeout->addItem(ch);
}
menu_timeout->addItem(new CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, LOCALE_TIMING_INFOBAR));
for (int i = 0; i < SNeutrinoSettings::HANDLING_INFOBAR_SETTING_COUNT; i++)
{
ch = new CMenuOptionNumberChooser(handling_infobar_setting[i].name, &g_settings.handling_infobar[i], true, 0, 240);
ch->setNumberFormat(nf);
ch->setLocalizedValue(0, LOCALE_TIMING_OFF);
ch->setHint("", handling_infobar_setting[i].hint);
menu_timeout->addItem(ch);
}
menu_timeout->addItem(GenericMenuSeparatorLine);
menu_timeout->addItem(new CMenuForwarder(LOCALE_OPTIONS_DEFAULT, true, NULL, this, "osd.def", CRCInput::RC_red));
}