mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-29 16:31:05 +02:00
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:
@@ -1525,61 +1525,50 @@ void CMenuWidget::setFooter(const struct button_label *_fbutton_labels, const in
|
|||||||
|
|
||||||
|
|
||||||
//-------------------------------------------------------------------------------------------------------------------------------
|
//-------------------------------------------------------------------------------------------------------------------------------
|
||||||
CMenuOptionNumberChooser::CMenuOptionNumberChooser(const neutrino_locale_t Name, int * const OptionValue, const bool Active,
|
CMenuOptionNumberChooser::CMenuOptionNumberChooser( const neutrino_locale_t Name, int * const OptionValue, const bool Active,
|
||||||
const int min_value, const int max_value,
|
const int min_value, const int max_value,
|
||||||
CChangeObserver * const Observ, const neutrino_msg_t DirectKey, const char * const IconName,
|
CChangeObserver * const Observ, const neutrino_msg_t DirectKey, const char * const IconName,
|
||||||
const int print_offset, const int special_value, const neutrino_locale_t special_value_name, bool sliderOn)
|
const int print_offset, const int special_value, const neutrino_locale_t special_value_name, bool sliderOn)
|
||||||
: CAbstractMenuOptionChooser(Active, DirectKey, IconName)
|
: CAbstractMenuOptionChooser(Active, DirectKey, IconName)
|
||||||
{
|
{
|
||||||
name = Name;
|
init(Name, "", OptionValue, min_value, max_value, print_offset, special_value, special_value_name, Observ, sliderOn);
|
||||||
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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CMenuOptionNumberChooser::CMenuOptionNumberChooser(const std::string &Name, int * const OptionValue, const bool Active,
|
CMenuOptionNumberChooser::CMenuOptionNumberChooser( const std::string &Name, int * const OptionValue, const bool Active,
|
||||||
const int min_value, const int max_value,
|
const int min_value, const int max_value,
|
||||||
CChangeObserver * const Observ, const neutrino_msg_t DirectKey, const char * const IconName,
|
CChangeObserver * const Observ, const neutrino_msg_t DirectKey, const char * const IconName,
|
||||||
const int print_offset, const int special_value, const neutrino_locale_t special_value_name, bool sliderOn)
|
const int print_offset, const int special_value, const neutrino_locale_t special_value_name, bool sliderOn)
|
||||||
: CAbstractMenuOptionChooser(Active, DirectKey, IconName)
|
: CAbstractMenuOptionChooser(Active, DirectKey, IconName)
|
||||||
{
|
{
|
||||||
name = NONEXISTANT_LOCALE;
|
init(NONEXISTANT_LOCALE, Name, OptionValue, min_value, max_value, print_offset, special_value, special_value_name, Observ, sliderOn);
|
||||||
optionValue = OptionValue;
|
}
|
||||||
|
|
||||||
lower_bound = min_value;
|
void CMenuOptionNumberChooser::init( const neutrino_locale_t& lName,
|
||||||
upper_bound = max_value;
|
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;
|
||||||
|
observ = Observ;
|
||||||
|
slider_on = sliderOn;
|
||||||
|
|
||||||
display_offset = print_offset;
|
numberFormat = "%d";
|
||||||
|
numberFormatFunction = NULL;
|
||||||
localized_value = special_value;
|
directKeyOK = false;
|
||||||
localized_value_name = special_value_name;
|
numeric_input = false;
|
||||||
|
|
||||||
nameString = Name;
|
|
||||||
numberFormat = "%d";
|
|
||||||
numberFormatFunction = NULL;
|
|
||||||
observ = Observ;
|
|
||||||
slider_on = sliderOn;
|
|
||||||
|
|
||||||
numeric_input = false;
|
|
||||||
|
|
||||||
directKeyOK = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int CMenuOptionNumberChooser::exec(CMenuTarget*)
|
int CMenuOptionNumberChooser::exec(CMenuTarget*)
|
||||||
|
@@ -325,6 +325,17 @@ private:
|
|||||||
std::string numberFormat;
|
std::string numberFormat;
|
||||||
std::string (*numberFormatFunction)(int num);
|
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:
|
public:
|
||||||
CMenuOptionNumberChooser(const neutrino_locale_t name, int * const OptionValue, const bool Active,
|
CMenuOptionNumberChooser(const neutrino_locale_t name, int * const OptionValue, const bool Active,
|
||||||
const int min_value, const int max_value, CChangeObserver * const Observ = NULL,
|
const int min_value, const int max_value, CChangeObserver * const Observ = NULL,
|
||||||
|
Reference in New Issue
Block a user