* Various changes for reworked mute icon handling in some classes

- mute icon disabled for moviebrowser, upnpbrowser, pictureviewer
- extra handling for audioplayer
This commit is contained in:
Michael Liebmann
2013-05-13 04:30:36 +02:00
parent 1049b337bb
commit bf1c7bfdb7
9 changed files with 46 additions and 11 deletions

View File

@@ -38,6 +38,7 @@
#include <neutrino_menue.h>
#include <neutrinoMessages.h>
#include <gui/audiomute.h>
#include <gui/movieplayer.h>
#include <gui/pictureviewer.h>
#if ENABLE_UPNP
@@ -87,30 +88,35 @@ int CMediaPlayerMenu::exec(CMenuTarget* parent, const std::string &actionKey)
if (parent)
parent->hide();
CAudioMute *audiomute = CAudioMute::getInstance();
if (actionKey == "audioplayer")
{
audiomute->enableMuteIcon(false);
if (audioPlayer == NULL)
audioPlayer = new CAudioPlayerGui();
int res = audioPlayer->exec(NULL, "init");
audiomute->enableMuteIcon(true);
return res /*menu_return::RETURN_REPAINT*/;
}
else if (actionKey == "inetplayer")
{
audiomute->enableMuteIcon(false);
if (inetPlayer == NULL)
inetPlayer = new CAudioPlayerGui(true);
int res = inetPlayer->exec(NULL, "init");
audiomute->enableMuteIcon(true);
return res; //menu_return::RETURN_REPAINT;
}
else if (actionKey == "movieplayer")
{
audiomute->enableMuteIcon(false);
int mode = CNeutrinoApp::getInstance()->getMode();
if( mode == NeutrinoMessages::mode_radio )
videoDecoder->StopPicture();
int res = CMoviePlayerGui::getInstance().exec(NULL, "tsmoviebrowser");
if( mode == NeutrinoMessages::mode_radio )
videoDecoder->ShowPicture(DATADIR "/neutrino/icons/radiomode.jpg");
audiomute->enableMuteIcon(true);
return res;
}