mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-27 07:23:09 +02:00
gui/widget/menue.cpp: add CMenuOptionChooser::setOptions
This commit is contained in:
@@ -1350,9 +1350,7 @@ CMenuOptionChooser::CMenuOptionChooser(const neutrino_locale_t OptionName, int *
|
||||
for (unsigned int i = 0; i < number_of_options; i++)
|
||||
{
|
||||
struct keyval_ext opt;
|
||||
opt.key = Options[i].key;
|
||||
opt.value = Options[i].value;
|
||||
opt.valname = NULL;
|
||||
opt = Options[i];
|
||||
options.push_back(opt);
|
||||
}
|
||||
}
|
||||
@@ -1373,9 +1371,7 @@ CMenuOptionChooser::CMenuOptionChooser(const std::string &OptionName, int * cons
|
||||
for (unsigned int i = 0; i < number_of_options; i++)
|
||||
{
|
||||
struct keyval_ext opt;
|
||||
opt.key = Options[i].key;
|
||||
opt.value = Options[i].value;
|
||||
opt.valname = NULL;
|
||||
opt = Options[i];
|
||||
options.push_back(opt);
|
||||
}
|
||||
}
|
||||
@@ -1450,10 +1446,33 @@ CMenuOptionChooser::CMenuOptionChooser(const std::string &OptionName, int * cons
|
||||
|
||||
CMenuOptionChooser::~CMenuOptionChooser()
|
||||
{
|
||||
options.clear();
|
||||
clearChooserOptions();
|
||||
}
|
||||
|
||||
void CMenuOptionChooser::setOptions(const struct keyval * const Options, const unsigned Number_Of_Options)
|
||||
{
|
||||
options.clear();
|
||||
number_of_options = Number_Of_Options;
|
||||
for (unsigned int i = 0; i < number_of_options; i++)
|
||||
{
|
||||
struct keyval_ext opt;
|
||||
opt = Options[i];
|
||||
options.push_back(opt);
|
||||
}
|
||||
if (used && x != -1)
|
||||
paint(false);
|
||||
}
|
||||
|
||||
void CMenuOptionChooser::setOptions(const struct keyval_ext * const Options, const unsigned Number_Of_Options)
|
||||
{
|
||||
options.clear();
|
||||
number_of_options = Number_Of_Options;
|
||||
for (unsigned int i = 0; i < number_of_options; i++)
|
||||
options.push_back(Options[i]);
|
||||
if (used && x != -1)
|
||||
paint(false);
|
||||
}
|
||||
|
||||
void CMenuOptionChooser::setOption(const int newvalue)
|
||||
{
|
||||
*optionValue = newvalue;
|
||||
|
Reference in New Issue
Block a user