mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 08:21:12 +02:00
- 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:
@@ -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
|
||||
|
@@ -43,7 +43,7 @@ class CMediaPlayerMenu : public CMenuTarget
|
||||
int width, usage_mode;
|
||||
neutrino_locale_t menu_title;
|
||||
|
||||
void showMenu();
|
||||
int showMenu();
|
||||
void showMoviePlayer(CMenuWidget *menu_movieplayer);
|
||||
|
||||
public:
|
||||
|
Reference in New Issue
Block a user