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
This commit is contained in:
focus
2011-11-22 11:37:42 +00:00
parent c4c96b844d
commit 8dceacd2a7
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;
}
showKeySetup();
res = showKeySetup();
return res;
}
@@ -163,7 +163,7 @@ const key_settings_struct_t key_settings[CKeybindSetup::KEYBINDS_COUNT] =
};
void CKeybindSetup::showKeySetup()
int CKeybindSetup::showKeySetup()
{
//keysetup menu
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_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();
selected = keySettings->getSelected();
delete keySettings;
return res;
}

View File

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

View File

@@ -91,12 +91,10 @@ int CUserMenuSetup::exec(CMenuTarget* parent, const std::string &)
if(parent != NULL)
parent->hide();
showSetup();
return menu_return::RETURN_REPAINT;
return showSetup();
}
void CUserMenuSetup::showSetup()
int CUserMenuSetup::showSetup()
{
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->exec(NULL, "");
int res = ums->exec(NULL, "");
ums->hide();
delete ums;
return res;
}

View File

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