mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-28 16:01:10 +02:00
gui/widget/menue.cpp: fix menu_left_exit option;
remove can_arrow member - isMenueOptionChooser() is enough
Origin commit data
------------------
Branch: ni/coolstream
Commit: e02258276e
Author: [CST] Focus <focus.cst@gmail.com>
Date: 2012-07-16 (Mon, 16 Jul 2012)
------------------
This commit was generated by Migit
This commit is contained in:
@@ -61,7 +61,6 @@ CMenuItem::CMenuItem()
|
|||||||
directKey = CRCInput::RC_nokey;
|
directKey = CRCInput::RC_nokey;
|
||||||
iconName = "";
|
iconName = "";
|
||||||
iconName_Info_right = "";
|
iconName_Info_right = "";
|
||||||
can_arrow = false;
|
|
||||||
used = false;
|
used = false;
|
||||||
icon_frame_w = 10;
|
icon_frame_w = 10;
|
||||||
hint = NONEXISTANT_LOCALE;
|
hint = NONEXISTANT_LOCALE;
|
||||||
@@ -509,7 +508,7 @@ int CMenuWidget::exec(CMenuTarget* parent, const std::string &)
|
|||||||
|
|
||||||
do {
|
do {
|
||||||
if(hasItem() && selected >= 0 && (int)items.size() > selected )
|
if(hasItem() && selected >= 0 && (int)items.size() > selected )
|
||||||
bAllowRepeatLR = items[selected]->can_arrow;
|
bAllowRepeatLR = items[selected]->isMenueOptionChooser(); //can_arrow;
|
||||||
|
|
||||||
g_RCInput->getMsgAbsoluteTimeout(&msg, &data, &timeoutEnd, bAllowRepeatLR);
|
g_RCInput->getMsgAbsoluteTimeout(&msg, &data, &timeoutEnd, bAllowRepeatLR);
|
||||||
|
|
||||||
@@ -643,12 +642,13 @@ int CMenuWidget::exec(CMenuTarget* parent, const std::string &)
|
|||||||
break;
|
break;
|
||||||
case (CRCInput::RC_left):
|
case (CRCInput::RC_left):
|
||||||
{
|
{
|
||||||
CMenuItem* itemX = items[selected];
|
if(hasItem() && selected > -1 && (int)items.size() > selected) {
|
||||||
int menu_left_exit = (itemX->isMenueOptionChooser() == 1) ? 0 : g_settings.menu_left_exit;
|
CMenuItem* itemX = items[selected];
|
||||||
if ((hasItem() && (selected < 0 || !items[selected]->can_arrow)) ||
|
if (!itemX->isMenueOptionChooser()) {
|
||||||
menu_left_exit) {
|
if (g_settings.menu_left_exit)
|
||||||
msg = CRCInput::RC_timeout;
|
msg = CRCInput::RC_timeout;
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
case (CRCInput::RC_right):
|
case (CRCInput::RC_right):
|
||||||
@@ -1224,7 +1224,6 @@ CMenuOptionNumberChooser::CMenuOptionNumberChooser(const neutrino_locale_t name,
|
|||||||
localized_value_name = special_value_name;
|
localized_value_name = special_value_name;
|
||||||
|
|
||||||
optionString = non_localized_name;
|
optionString = non_localized_name;
|
||||||
can_arrow = true;
|
|
||||||
observ = Observ;
|
observ = Observ;
|
||||||
slider_on = sliderOn;
|
slider_on = sliderOn;
|
||||||
}
|
}
|
||||||
@@ -1288,7 +1287,6 @@ CMenuOptionChooser::CMenuOptionChooser(const neutrino_locale_t OptionName, int *
|
|||||||
observ = Observ;
|
observ = Observ;
|
||||||
directKey = DirectKey;
|
directKey = DirectKey;
|
||||||
iconName = IconName;
|
iconName = IconName;
|
||||||
can_arrow = true;
|
|
||||||
pulldown = Pulldown;
|
pulldown = Pulldown;
|
||||||
for (unsigned int i = 0; i < number_of_options; i++)
|
for (unsigned int i = 0; i < number_of_options; i++)
|
||||||
{
|
{
|
||||||
@@ -1311,7 +1309,6 @@ CMenuOptionChooser::CMenuOptionChooser(const char* OptionName, int * const Optio
|
|||||||
observ = Observ;
|
observ = Observ;
|
||||||
directKey = DirectKey;
|
directKey = DirectKey;
|
||||||
iconName = IconName;
|
iconName = IconName;
|
||||||
can_arrow = true;
|
|
||||||
pulldown = Pulldown;
|
pulldown = Pulldown;
|
||||||
for (unsigned int i = 0; i < number_of_options; i++)
|
for (unsigned int i = 0; i < number_of_options; i++)
|
||||||
{
|
{
|
||||||
@@ -1336,7 +1333,6 @@ CMenuOptionChooser::CMenuOptionChooser(const neutrino_locale_t OptionName, int *
|
|||||||
observ = Observ;
|
observ = Observ;
|
||||||
directKey = DirectKey;
|
directKey = DirectKey;
|
||||||
iconName = IconName;
|
iconName = IconName;
|
||||||
can_arrow = true;
|
|
||||||
pulldown = Pulldown;
|
pulldown = Pulldown;
|
||||||
for (unsigned int i = 0; i < number_of_options; i++)
|
for (unsigned int i = 0; i < number_of_options; i++)
|
||||||
options.push_back(Options[i]);
|
options.push_back(Options[i]);
|
||||||
@@ -1355,7 +1351,6 @@ CMenuOptionChooser::CMenuOptionChooser(const char* OptionName, int * const Optio
|
|||||||
observ = Observ;
|
observ = Observ;
|
||||||
directKey = DirectKey;
|
directKey = DirectKey;
|
||||||
iconName = IconName;
|
iconName = IconName;
|
||||||
can_arrow = true;
|
|
||||||
pulldown = Pulldown;
|
pulldown = Pulldown;
|
||||||
for (unsigned int i = 0; i < number_of_options; i++)
|
for (unsigned int i = 0; i < number_of_options; i++)
|
||||||
options.push_back(Options[i]);
|
options.push_back(Options[i]);
|
||||||
@@ -1515,7 +1510,6 @@ CMenuOptionStringChooser::CMenuOptionStringChooser(const neutrino_locale_t Optio
|
|||||||
|
|
||||||
directKey = DirectKey;
|
directKey = DirectKey;
|
||||||
iconName = IconName;
|
iconName = IconName;
|
||||||
can_arrow = true;
|
|
||||||
pulldown = Pulldown;
|
pulldown = Pulldown;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1530,7 +1524,6 @@ CMenuOptionStringChooser::CMenuOptionStringChooser(const char* OptionName, char*
|
|||||||
|
|
||||||
directKey = DirectKey;
|
directKey = DirectKey;
|
||||||
iconName = IconName;
|
iconName = IconName;
|
||||||
can_arrow = true;
|
|
||||||
pulldown = Pulldown;
|
pulldown = Pulldown;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -93,7 +93,6 @@ class CMenuItem
|
|||||||
bool active;
|
bool active;
|
||||||
neutrino_msg_t directKey;
|
neutrino_msg_t directKey;
|
||||||
neutrino_msg_t msg;
|
neutrino_msg_t msg;
|
||||||
bool can_arrow;
|
|
||||||
std::string iconName;
|
std::string iconName;
|
||||||
std::string selected_iconName;
|
std::string selected_iconName;
|
||||||
std::string iconName_Info_right;
|
std::string iconName_Info_right;
|
||||||
|
Reference in New Issue
Block a user