mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-09-03 02:41:12 +02:00
Revert "CMenuOptionNumberChooser: expand localize functionality for any number"
This reverts commit1a68428f80
because of many bothering compiler warnings: extended initializer lists only available with -std=c++11 or -std=gnu++11 Origin commit data ------------------ Commit:adb80290ba
Author: vanhofen <vanhofen@gmx.de> Date: 2018-04-04 (Wed, 04 Apr 2018)
This commit is contained in:
@@ -1644,7 +1644,8 @@ void CMenuOptionNumberChooser::init( const neutrino_locale_t& lName,
|
||||
lower_bound = min_value;
|
||||
upper_bound = max_value;
|
||||
display_offset = print_offset;
|
||||
setLocalizedValue (special_value, special_value_name);
|
||||
localized_value = special_value;
|
||||
localized_value_name = special_value_name;
|
||||
observ = Observ;
|
||||
slider_on = sliderOn;
|
||||
|
||||
@@ -1708,24 +1709,18 @@ int CMenuOptionNumberChooser::paint(bool selected)
|
||||
const char * l_option;
|
||||
char option_value[40];
|
||||
|
||||
for (size_t i = 0; i < localized.size(); i++)
|
||||
if ((localized_value_name == NONEXISTANT_LOCALE) || ((*optionValue) != localized_value))
|
||||
{
|
||||
if ((localized[i].value_name == NONEXISTANT_LOCALE) || ((*optionValue) != localized[i].value))
|
||||
{
|
||||
if (numberFormatFunction) {
|
||||
std::string s = numberFormatFunction(*optionValue + display_offset);
|
||||
strncpy(option_value, s.c_str(), sizeof(option_value));
|
||||
} else
|
||||
sprintf(option_value, numberFormat.c_str(), *optionValue + display_offset);
|
||||
l_option = option_value;
|
||||
}
|
||||
else
|
||||
{
|
||||
l_option = g_Locale->getText(localized[i].value_name);
|
||||
break;
|
||||
}
|
||||
if (numberFormatFunction) {
|
||||
std::string s = numberFormatFunction(*optionValue + display_offset);
|
||||
strncpy(option_value, s.c_str(), sizeof(option_value));
|
||||
} else
|
||||
sprintf(option_value, numberFormat.c_str(), *optionValue + display_offset);
|
||||
l_option = option_value;
|
||||
}
|
||||
|
||||
else
|
||||
l_option = g_Locale->getText(localized_value_name);
|
||||
|
||||
//paint item
|
||||
prepareItem(selected, height);
|
||||
|
||||
|
Reference in New Issue
Block a user