Audioplayer: Remove special handling for display mute icon

Origin commit data
------------------
Commit: bace5ce91b
Author: Michael Liebmann <tuxcode.bbg@gmail.com>
Date: 2013-11-04 (Mon, 04 Nov 2013)
This commit is contained in:
Michael Liebmann
2013-11-04 11:51:05 +01:00
parent 1a8479cbef
commit 5aa9f6a272
6 changed files with 2 additions and 29 deletions

View File

@@ -105,11 +105,6 @@ void CVolume::setVolume(const neutrino_msg_t key)
if (CNeutrinoApp::getInstance()->isMuted() && (dir > 0 || g_settings.current_volume > 0)) {
hideVolscale();
CAudioMute::getInstance()->AudioMute(false, true);
if (mode == CNeutrinoApp::mode_audio) {
CAudioPlayerGui *cap = CMediaPlayerMenu::getInstance()->getPlayerInstance();
if (cap != NULL)
cap->refreshMuteIcon();
}
setVolume(msg);
return;
}
@@ -126,11 +121,6 @@ void CVolume::setVolume(const neutrino_msg_t key)
if (g_settings.show_mute_icon) {
hideVolscale();
CAudioMute::getInstance()->AudioMute(true, true);
if (mode == CNeutrinoApp::mode_audio) {
CAudioPlayerGui *cap = CMediaPlayerMenu::getInstance()->getPlayerInstance();
if (cap != NULL)
cap->refreshMuteIcon();
}
setVolume(msg);
return;
}

View File

@@ -60,7 +60,7 @@ void CAudioMute::AudioMute(int newValue, bool isEvent)
neutrino->setCurrentMuted(newValue);
g_Zapit->muteAudio(newValue);
if( isEvent && ( neutrino->getMode() != CNeutrinoApp::mode_scart ) && ( neutrino->getMode() != CNeutrinoApp::mode_audio) && ( neutrino->getMode() != CNeutrinoApp::mode_pic))
if( isEvent && ( neutrino->getMode() != CNeutrinoApp::mode_scart ) && ( neutrino->getMode() != CNeutrinoApp::mode_pic))
{
CVolumeHelper::getInstance()->getMuteIconDimensions(&x, &y, &width, &height);
if ((y_old != y)) {
@@ -92,12 +92,6 @@ void CAudioMute::AudioMute(int newValue, bool isEvent)
if (doInit)
CVolumeHelper::getInstance()->refresh();
}
else if (neutrino->getMode() == CNeutrinoApp::mode_audio) {
if (newValue)
frameBuffer->setFbArea(CFrameBuffer::FB_PAINTAREA_MUTEICON1, x, y, width, height);
else
frameBuffer->setFbArea(CFrameBuffer::FB_PAINTAREA_MUTEICON1);
}
}
void CAudioMute::enableMuteIcon(bool enable)

View File

@@ -281,8 +281,6 @@ int CAudioPlayerGui::exec(CMenuTarget* parent, const std::string &actionKey)
m_fheight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getHeight();
int iw, ih;
m_frameBuffer->getIconSize(NEUTRINO_ICON_BUTTON_MUTE, &iw, &ih);
m_theight = std::max(m_theight, ih+2);
m_frameBuffer->getIconSize(NEUTRINO_ICON_MP3, &iw, &ih);
m_theight = std::max(m_theight, ih+4);
@@ -901,8 +899,6 @@ int CAudioPlayerGui::show()
ret = menu_return::RETURN_EXIT_ALL;
loop = false;
}
// update mute icon
paintHead();
paintLCD();
}
}
@@ -1650,9 +1646,6 @@ void CAudioPlayerGui::paintHead()
if (m_inetmode)
header.setCaption(LOCALE_INETRADIO_NAME);
if (CNeutrinoApp::getInstance()->isMuted())
header.addButtonIcon(NEUTRINO_ICON_BUTTON_MUTE_SMALL);
#ifdef ENABLE_GUI_MOUNT
if (!m_inetmode)
header.addButtonIcon(NEUTRINO_ICON_BUTTON_MENU);

View File

@@ -261,7 +261,6 @@ class CAudioPlayerGui : public CMenuTarget
bool playNext(bool allow_rotate = false);
bool playPrev(bool allow_rotate = false);
int getAudioPlayerM_current() {return m_current;}
void refreshMuteIcon() { paintHead(); }
};

View File

@@ -91,11 +91,9 @@ int CMediaPlayerMenu::exec(CMenuTarget* parent, const std::string &actionKey)
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")

View File

@@ -637,8 +637,7 @@ int CPictureViewerGui::show()
}
hide();
if (!audioplayer)
CAudioMute::getInstance()->enableMuteIcon(true);
CAudioMute::getInstance()->enableMuteIcon(true);
return(res);
}