mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-27 23:42:58 +02:00
CMenuOptionStringChooser: clean up multiple code parts
This commit is contained in:
@@ -2000,24 +2000,29 @@ int CMenuOptionChooser::getWidth(void)
|
|||||||
|
|
||||||
//-------------------------------------------------------------------------------------------------------------------------------
|
//-------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
CMenuOptionStringChooser::CMenuOptionStringChooser(const neutrino_locale_t OptionName, std::string* OptionValue, bool Active, CChangeObserver* Observ,
|
CMenuOptionStringChooser::CMenuOptionStringChooser( const neutrino_locale_t OptionName, std::string* OptionValue, bool Active, CChangeObserver* Observ,
|
||||||
const neutrino_msg_t DirectKey, const char * const IconName, bool Pulldown)
|
const neutrino_msg_t DirectKey, const char * const IconName, bool Pulldown)
|
||||||
: CMenuItem(Active, DirectKey, IconName)
|
: CMenuItem(Active, DirectKey, IconName)
|
||||||
{
|
{
|
||||||
nameString = "";
|
init("", OptionName, OptionValue, Observ, Pulldown);
|
||||||
name = OptionName;
|
|
||||||
optionValuePtr = OptionValue ? OptionValue : &optionValue;
|
|
||||||
observ = Observ;
|
|
||||||
pulldown = Pulldown;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CMenuOptionStringChooser::CMenuOptionStringChooser(const std::string &OptionName, std::string* OptionValue, bool Active, CChangeObserver* Observ,
|
CMenuOptionStringChooser::CMenuOptionStringChooser( const std::string &OptionName, std::string* OptionValue, bool Active, CChangeObserver* Observ,
|
||||||
const neutrino_msg_t DirectKey, const char * const IconName, bool Pulldown)
|
const neutrino_msg_t DirectKey, const char * const IconName, bool Pulldown)
|
||||||
: CMenuItem(Active, DirectKey, IconName)
|
: CMenuItem(Active, DirectKey, IconName)
|
||||||
|
{
|
||||||
|
init(OptionName, NONEXISTANT_LOCALE, OptionValue, Observ, Pulldown);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CMenuOptionStringChooser::init( const std::string &OptionName,
|
||||||
|
const neutrino_locale_t Name,
|
||||||
|
std::string* pOptionValue,
|
||||||
|
CChangeObserver * const Observ,
|
||||||
|
bool Pulldown)
|
||||||
{
|
{
|
||||||
nameString = OptionName;
|
nameString = OptionName;
|
||||||
name = NONEXISTANT_LOCALE;
|
name = Name;
|
||||||
optionValuePtr = OptionValue ? OptionValue : &optionValue;
|
optionValuePtr = pOptionValue ? pOptionValue : &optionValue;
|
||||||
observ = Observ;
|
observ = Observ;
|
||||||
pulldown = Pulldown;
|
pulldown = Pulldown;
|
||||||
}
|
}
|
||||||
|
@@ -453,6 +453,11 @@ class CMenuOptionStringChooser : public CMenuItem
|
|||||||
std::vector<std::string> options;
|
std::vector<std::string> options;
|
||||||
CChangeObserver * observ;
|
CChangeObserver * observ;
|
||||||
bool pulldown;
|
bool pulldown;
|
||||||
|
void init( const std::string &OptionName,
|
||||||
|
const neutrino_locale_t Name,
|
||||||
|
std::string* pOptionValue,
|
||||||
|
CChangeObserver * const Observ,
|
||||||
|
bool Pulldown );
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CMenuOptionStringChooser(const neutrino_locale_t Name, std::string* OptionValue, bool Active = false,
|
CMenuOptionStringChooser(const neutrino_locale_t Name, std::string* OptionValue, bool Active = false,
|
||||||
|
Reference in New Issue
Block a user