CMenuOptionNumberChooser: clean up multiple code parts

Origin commit data
------------------
Branch: ni/coolstream
Commit: f2e8f95e66
Author: Thilo Graf <dbt@novatux.de>
Date: 2017-06-18 (Sun, 18 Jun 2017)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
2017-06-18 00:04:40 +02:00
parent 65a2486250
commit b0d7a2a488
2 changed files with 49 additions and 49 deletions

View File

@@ -1531,27 +1531,7 @@ CMenuOptionNumberChooser::CMenuOptionNumberChooser(const neutrino_locale_t Name,
const int print_offset, const int special_value, const neutrino_locale_t special_value_name, bool sliderOn)
: CAbstractMenuOptionChooser(Active, DirectKey, IconName)
{
name = Name;
optionValue = OptionValue;
lower_bound = min_value;
upper_bound = max_value;
display_offset = print_offset;
localized_value = special_value;
localized_value_name = special_value_name;
display_offset = print_offset;
nameString = "";
numberFormat = "%d";
numberFormatFunction = NULL;
observ = Observ;
slider_on = sliderOn;
numeric_input = false;
directKeyOK = false;
init(Name, "", OptionValue, min_value, max_value, print_offset, special_value, special_value_name, Observ, sliderOn);
}
CMenuOptionNumberChooser::CMenuOptionNumberChooser( const std::string &Name, int * const OptionValue, const bool Active,
@@ -1560,26 +1540,35 @@ CMenuOptionNumberChooser::CMenuOptionNumberChooser(const std::string &Name, int
const int print_offset, const int special_value, const neutrino_locale_t special_value_name, bool sliderOn)
: CAbstractMenuOptionChooser(Active, DirectKey, IconName)
{
name = NONEXISTANT_LOCALE;
optionValue = OptionValue;
init(NONEXISTANT_LOCALE, Name, OptionValue, min_value, max_value, print_offset, special_value, special_value_name, Observ, sliderOn);
}
void CMenuOptionNumberChooser::init( const neutrino_locale_t& lName,
const std::string &sName,
int* const Option_Value,
const int& min_value,
const int& max_value,
const int& print_offset,
const int& special_value,
const neutrino_locale_t& special_value_name,
CChangeObserver * const Observ,
bool sliderOn)
{
name = lName;
nameString = sName;
optionValue = Option_Value;
lower_bound = min_value;
upper_bound = max_value;
display_offset = print_offset;
localized_value = special_value;
localized_value_name = special_value_name;
nameString = Name;
numberFormat = "%d";
numberFormatFunction = NULL;
observ = Observ;
slider_on = sliderOn;
numeric_input = false;
numberFormat = "%d";
numberFormatFunction = NULL;
directKeyOK = false;
numeric_input = false;
}
int CMenuOptionNumberChooser::exec(CMenuTarget*)

View File

@@ -325,6 +325,17 @@ private:
std::string numberFormat;
std::string (*numberFormatFunction)(int num);
void init( const neutrino_locale_t& lName,
const std::string &sName,
int* const Option_Value,
const int& min_value,
const int& max_value,
const int& print_offset,
const int& special_value,
const neutrino_locale_t& special_value_name,
CChangeObserver * const Observ,
bool sliderOn);
public:
CMenuOptionNumberChooser(const neutrino_locale_t name, int * const OptionValue, const bool Active,
const int min_value, const int max_value, CChangeObserver * const Observ = NULL,