gui/osd_setup, gui/record_setup: use CMenuOptionNumberChooser ...

... instead of CStringInput to enter numbers

* neutrino.cpp: drop SetupTiming method
* system/settings: use integers for timing values#
* system/setting_helpers: drop CTimingSettingsNotifier


Origin commit data
------------------
Branch: ni/coolstream
Commit: 697b1a75b3
Author: martii <m4rtii@gmx.de>
Date: 2013-12-22 (Sun, 22 Dec 2013)

Origin message was:
------------------
gui/osd_setup, gui/record_setup: use CMenuOptionNumberChooser ...

 ... instead of CStringInput to enter numbers

* neutrino.cpp: drop SetupTiming method
* system/settings: use integers for timing values#
* system/setting_helpers: drop CTimingSettingsNotifier


------------------
This commit was generated by Migit
This commit is contained in:
martii
2013-12-22 20:40:37 +01:00
committed by vanhofen
parent d30e17ddac
commit cd83c1117e
10 changed files with 46 additions and 61 deletions

View File

@@ -63,8 +63,6 @@
extern CRemoteControl * g_RemoteControl;
static CTimingSettingsNotifier timingsettingsnotifier;
extern const char * locale_real_names[];
extern std::string ttx_font_file;
@@ -329,8 +327,6 @@ int COsdSetup::exec(CMenuTarget* parent, const std::string &actionKey)
else if(actionKey=="osd.def") {
for (int i = 0; i < SNeutrinoSettings::TIMING_SETTING_COUNT; i++)
g_settings.timing[i] = timing_setting[i].default_timing;
CNeutrinoApp::getInstance()->SetupTiming();
return res;
}
else if(actionKey=="logo_dir") {
@@ -811,10 +807,14 @@ void COsdSetup::showOsdTimeoutSetup(CMenuWidget* menu_timeout)
{
menu_timeout->addIntroItems(LOCALE_COLORMENU_TIMING);
std::string nf("%d ");
nf += g_Locale->getText(LOCALE_UNIT_SHORT_SECOND);
for (int i = 0; i < SNeutrinoSettings::TIMING_SETTING_COUNT; i++)
{
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 CMenuDForwarder(timing_setting[i].name, true, g_settings.timing_string[i], timing_item));
CMenuOptionNumberChooser *ch = new CMenuOptionNumberChooser(timing_setting[i].name, &g_settings.timing[i], true, 0, 99);
ch->setNumberFormat(nf);
ch->setHint("", LOCALE_MENU_HINT_OSD_TIMING);
menu_timeout->addItem(ch);
}
menu_timeout->addItem(GenericMenuSeparatorLine);