Return menu result, to close all menus

git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-beta@1878 e54a6e83-5905-42d5-8d5c-058d10e6a962


Origin commit data
------------------
Commit: 8dceacd2a7
Author: [CST] Focus <focus.cst@gmail.com>
Date: 2011-11-22 (Tue, 22 Nov 2011)
This commit is contained in:
[CST] Focus
2011-11-22 11:37:42 +00:00
parent 88eea703ec
commit c81ae9c940
4 changed files with 11 additions and 12 deletions

View File

@@ -101,7 +101,7 @@ int CKeybindSetup::exec(CMenuTarget* parent, const std::string &actionKey)
return menu_return::RETURN_REPAINT; return menu_return::RETURN_REPAINT;
} }
showKeySetup(); res = showKeySetup();
return res; return res;
} }
@@ -163,7 +163,7 @@ const key_settings_struct_t key_settings[CKeybindSetup::KEYBINDS_COUNT] =
}; };
void CKeybindSetup::showKeySetup() int CKeybindSetup::showKeySetup()
{ {
//keysetup menu //keysetup menu
CMenuWidget* keySettings = new CMenuWidget(LOCALE_MAINSETTINGS_HEAD, NEUTRINO_ICON_KEYBINDING, width); CMenuWidget* keySettings = new CMenuWidget(LOCALE_MAINSETTINGS_HEAD, NEUTRINO_ICON_KEYBINDING, width);
@@ -199,10 +199,11 @@ void CKeybindSetup::showKeySetup()
keySettings->addItem(new CMenuForwarder(LOCALE_USERMENU_BUTTON_YELLOW, true, NULL, new CUserMenuSetup(LOCALE_USERMENU_BUTTON_YELLOW,2), NULL, CRCInput::RC_yellow, NEUTRINO_ICON_BUTTON_YELLOW)); keySettings->addItem(new CMenuForwarder(LOCALE_USERMENU_BUTTON_YELLOW, true, NULL, new CUserMenuSetup(LOCALE_USERMENU_BUTTON_YELLOW,2), NULL, CRCInput::RC_yellow, NEUTRINO_ICON_BUTTON_YELLOW));
keySettings->addItem(new CMenuForwarder(LOCALE_USERMENU_BUTTON_BLUE, true, NULL, new CUserMenuSetup(LOCALE_USERMENU_BUTTON_BLUE,3), NULL, CRCInput::RC_blue, NEUTRINO_ICON_BUTTON_BLUE)); keySettings->addItem(new CMenuForwarder(LOCALE_USERMENU_BUTTON_BLUE, true, NULL, new CUserMenuSetup(LOCALE_USERMENU_BUTTON_BLUE,3), NULL, CRCInput::RC_blue, NEUTRINO_ICON_BUTTON_BLUE));
keySettings->exec(NULL, ""); int res = keySettings->exec(NULL, "");
keySettings->hide(); keySettings->hide();
selected = keySettings->getSelected(); selected = keySettings->getSelected();
delete keySettings; delete keySettings;
return res;
} }

View File

@@ -93,7 +93,7 @@ class CKeybindSetup : public CMenuTarget
int width, selected; int width, selected;
void showKeySetup(); int showKeySetup();
void showKeyBindSetup(CMenuWidget *bindSettings); void showKeyBindSetup(CMenuWidget *bindSettings);
void showKeyBindModeSetup(CMenuWidget *bindSettings_modes); void showKeyBindModeSetup(CMenuWidget *bindSettings_modes);
void showKeyBindChannellistSetup(CMenuWidget *bindSettings_chlist); void showKeyBindChannellistSetup(CMenuWidget *bindSettings_chlist);
@@ -108,4 +108,4 @@ class CKeybindSetup : public CMenuTarget
#endif #endif

View File

@@ -91,12 +91,10 @@ int CUserMenuSetup::exec(CMenuTarget* parent, const std::string &)
if(parent != NULL) if(parent != NULL)
parent->hide(); parent->hide();
showSetup(); return showSetup();
return menu_return::RETURN_REPAINT;
} }
void CUserMenuSetup::showSetup() int CUserMenuSetup::showSetup()
{ {
CMenuWidget * ums = new CMenuWidget(local, NEUTRINO_ICON_KEYBINDING, width); CMenuWidget * ums = new CMenuWidget(local, NEUTRINO_ICON_KEYBINDING, width);
@@ -120,9 +118,9 @@ void CUserMenuSetup::showSetup()
ums->addItem( new CMenuOptionChooser(text, &g_settings.usermenu[button][item], USERMENU_ITEM_OPTIONS, USERMENU_ITEM_OPTION_COUNT,true )); ums->addItem( new CMenuOptionChooser(text, &g_settings.usermenu[button][item], USERMENU_ITEM_OPTIONS, USERMENU_ITEM_OPTION_COUNT,true ));
} }
ums->exec(NULL, ""); int res = ums->exec(NULL, "");
ums->hide(); ums->hide();
delete ums; delete ums;
return res;
} }

View File

@@ -44,7 +44,7 @@
int button; int button;
neutrino_locale_t local; neutrino_locale_t local;
void showSetup(); int showSetup();
public: public:
CUserMenuSetup(neutrino_locale_t menue_title, int menue_button); CUserMenuSetup(neutrino_locale_t menue_title, int menue_button);