- mediaplayer.cpp: exit on menu button

git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-beta@1931 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
striper
2011-12-02 18:12:39 +00:00
parent 07ee1cd155
commit 7c43728084
2 changed files with 8 additions and 7 deletions

View File

@@ -81,7 +81,6 @@ CMediaPlayerMenu::~CMediaPlayerMenu()
int CMediaPlayerMenu::exec(CMenuTarget* parent, const std::string &actionKey)
{
printf("init mediaplayer menu in usage mode %d\n", usage_mode);
int res = menu_return::RETURN_REPAINT;
if (parent)
parent->hide();
@@ -92,7 +91,7 @@ int CMediaPlayerMenu::exec(CMenuTarget* parent, const std::string &actionKey)
audioPlayer = new CAudioPlayerGui();
audioPlayer->exec(NULL, "init");
return res;
return menu_return::RETURN_REPAINT;
}
else if (actionKey == "inetplayer")
{
@@ -100,16 +99,16 @@ int CMediaPlayerMenu::exec(CMenuTarget* parent, const std::string &actionKey)
inetPlayer = new CAudioPlayerGui(true);
inetPlayer->exec(NULL, "init");
return res;
return menu_return::RETURN_REPAINT;
}
showMenu();
int res = showMenu();
return res;
}
//show selectable mediaplayer items
void CMediaPlayerMenu::showMenu()
int CMediaPlayerMenu::showMenu()
{
CMenuWidget *media = new CMenuWidget(menu_title, NEUTRINO_ICON_MULTIMEDIA, width, MN_WIDGET_ID_MEDIA);
@@ -182,10 +181,12 @@ void CMediaPlayerMenu::showMenu()
#endif
}
media->exec(NULL, "");
int res = media->exec(NULL, "");
media->hide();
delete media;
setUsageMode();//set default usage_mode
return res;
}
//show movieplayer submenu with selectable items for moviebrowser or filebrowser