Preparing the menu classes for Lua Part #2

- Remove CMenuForwarderNonLocalized
- Add overloaded function CMenuForwarder for non local
 THX Martii


Origin commit data
------------------
Branch: ni/coolstream
Commit: b41819190d
Author: Michael Liebmann <tuxcode.bbg@gmail.com>
Date: 2014-01-16 (Thu, 16 Jan 2014)

Origin message was:
------------------
Preparing the menu classes for Lua Part #2

- Remove CMenuForwarderNonLocalized
- Add overloaded function CMenuForwarder for non local
 THX Martii


------------------
This commit was generated by Migit
This commit is contained in:
Michael Liebmann
2014-01-16 23:20:04 +01:00
parent 917e8aafa4
commit 7b4e3bc03b
35 changed files with 298 additions and 356 deletions

View File

@@ -710,36 +710,42 @@ private:
CChangeObserver * observer;
CConfigFile * configfile;
int32_t defaultvalue;
char value[11];
std::string value;
protected:
virtual const char * getOption(void)
{
sprintf(value, "%u", configfile->getInt32(locale_real_names[text], defaultvalue));
return value;
}
std::string getOption(fb_pixel_t * bgcol __attribute__((unused)) = NULL) {
return to_string(configfile->getInt32(locale_real_names[name], defaultvalue));
}
virtual bool changeNotify(const neutrino_locale_t OptionName, void * Data)
{
configfile->setInt32(locale_real_names[text], atoi(value));
return observer->changeNotify(OptionName, Data);
}
{
configfile->setInt32(locale_real_names[name], atoi(value.c_str()));
return observer->changeNotify(OptionName, Data);
}
public:
CMenuNumberInput(const neutrino_locale_t Text, const int32_t DefaultValue, CChangeObserver * const Observer, CConfigFile * const Configfile) : CMenuForwarder(Text, true, NULL, this)
{
observer = Observer;
configfile = Configfile;
defaultvalue = DefaultValue;
}
{
observer = Observer;
configfile = Configfile;
defaultvalue = DefaultValue;
}
int exec(CMenuTarget * parent, const std::string & action_Key)
{
CStringInput input(text, (char *)getOption(), 3, LOCALE_IPSETUP_HINT_1, LOCALE_IPSETUP_HINT_2, "0123456789 ", this);
return input.exec(parent, action_Key);
}
{
value = getOption();
while (value.length() < 3)
value = " " + value;
CStringInput input(name, &value, 3, LOCALE_IPSETUP_HINT_1, LOCALE_IPSETUP_HINT_2, "0123456789 ", this);
return input.exec(parent, action_Key);
}
std::string &getValue(void) {
value = getOption();
return value;
}
};
void COsdSetup::AddFontSettingItem(CMenuWidget &font_Settings, const SNeutrinoSettings::FONT_TYPES number_of_fontsize_entry)