mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 00:11:14 +02:00
* 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:
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user