mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-31 17:31:11 +02:00
menu: fix return value of getSelectedLine() for RC_timeout and RC_setup
This fixes the bahaviour of StartPosSelectionMenu in moviebrowser.
When this menu was closed by its timeout or RC_setup was pressed
the movie starts anyway.
Origin commit data
------------------
Branch: ni/coolstream
Commit: 70cbc65483
Author: vanhofen <vanhofen@gmx.de>
Date: 2018-07-15 (Sun, 15 Jul 2018)
Origin message was:
------------------
- menu: fix return value of getSelectedLine() for RC_timeout and RC_setup
This fixes the bahaviour of StartPosSelectionMenu in moviebrowser.
When this menu was closed by its timeout or RC_setup was pressed
the movie starts anyway.
------------------
This commit was generated by Migit
This commit is contained in:
@@ -409,7 +409,7 @@ class CMenuWidgetSelection : public CMenuWidget
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
CMenuWidgetSelection(const neutrino_locale_t Name, const std::string & Icon = "", const int mwidth = 30) : CMenuWidget(Name, Icon, mwidth){;};
|
CMenuWidgetSelection(const neutrino_locale_t Name, const std::string & Icon = "", const int mwidth = 30) : CMenuWidget(Name, Icon, mwidth){;};
|
||||||
int getSelectedLine(void){return exit_pressed ? -1 : selected;};
|
int getSelectedLine(void){return no_action ? -1 : selected;};
|
||||||
};
|
};
|
||||||
|
|
||||||
class CFileChooser : public CMenuWidget
|
class CFileChooser : public CMenuWidget
|
||||||
|
@@ -790,7 +790,7 @@ int CMenuWidget::exec(CMenuTarget* parent, const std::string &)
|
|||||||
bool bAllowRepeatLR = false;
|
bool bAllowRepeatLR = false;
|
||||||
CVFD::MODES oldLcdMode = CVFD::getInstance()->getMode();
|
CVFD::MODES oldLcdMode = CVFD::getInstance()->getMode();
|
||||||
|
|
||||||
exit_pressed = false;
|
no_action = false;
|
||||||
|
|
||||||
frameBuffer->Lock();
|
frameBuffer->Lock();
|
||||||
|
|
||||||
@@ -1019,14 +1019,16 @@ int CMenuWidget::exec(CMenuTarget* parent, const std::string &)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case (CRCInput::RC_home):
|
case (CRCInput::RC_home):
|
||||||
exit_pressed = true;
|
no_action = true;
|
||||||
msg = CRCInput::RC_timeout;
|
msg = CRCInput::RC_timeout;
|
||||||
break;
|
break;
|
||||||
case (CRCInput::RC_timeout):
|
case (CRCInput::RC_timeout):
|
||||||
|
no_action = true;
|
||||||
break;
|
break;
|
||||||
case (CRCInput::RC_setup):
|
case (CRCInput::RC_setup):
|
||||||
//close any menu on menu-key
|
//close any menu on menu-key
|
||||||
{
|
{
|
||||||
|
no_action = true;
|
||||||
msg = CRCInput::RC_timeout;
|
msg = CRCInput::RC_timeout;
|
||||||
retval = menu_return::RETURN_EXIT_ALL;
|
retval = menu_return::RETURN_EXIT_ALL;
|
||||||
}
|
}
|
||||||
|
@@ -588,7 +588,7 @@ class CMenuWidget : public CMenuTarget, public CComponentsSignals
|
|||||||
unsigned int item_start_y;
|
unsigned int item_start_y;
|
||||||
unsigned int current_page;
|
unsigned int current_page;
|
||||||
unsigned int total_pages;
|
unsigned int total_pages;
|
||||||
bool exit_pressed;
|
bool no_action;
|
||||||
int from_wizard;
|
int from_wizard;
|
||||||
bool fade;
|
bool fade;
|
||||||
bool washidden;
|
bool washidden;
|
||||||
@@ -640,7 +640,7 @@ class CMenuWidget : public CMenuTarget, public CComponentsSignals
|
|||||||
void initSelectable();
|
void initSelectable();
|
||||||
int getSelected()const { return selected; };
|
int getSelected()const { return selected; };
|
||||||
void move(int xoff, int yoff);
|
void move(int xoff, int yoff);
|
||||||
int getSelectedLine(void)const {return exit_pressed ? -1 : selected;};
|
int getSelectedLine(void)const {return no_action ? -1 : selected;};
|
||||||
void setWizardMode(int _from_wizard) { from_wizard = _from_wizard;};
|
void setWizardMode(int _from_wizard) { from_wizard = _from_wizard;};
|
||||||
void enableFade(bool _enable) { fade = _enable; };
|
void enableFade(bool _enable) { fade = _enable; };
|
||||||
void enableSaveScreen(bool enable);
|
void enableSaveScreen(bool enable);
|
||||||
|
Reference in New Issue
Block a user