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

View File

@@ -43,7 +43,7 @@ class CMediaPlayerMenu : public CMenuTarget
int width, usage_mode; int width, usage_mode;
neutrino_locale_t menu_title; neutrino_locale_t menu_title;
void showMenu(); int showMenu();
void showMoviePlayer(CMenuWidget *menu_movieplayer); void showMoviePlayer(CMenuWidget *menu_movieplayer);
public: public: