mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-29 16:31:05 +02:00
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:
@@ -105,11 +105,6 @@ void CVolume::setVolume(const neutrino_msg_t key)
|
|||||||
if (CNeutrinoApp::getInstance()->isMuted() && (dir > 0 || g_settings.current_volume > 0)) {
|
if (CNeutrinoApp::getInstance()->isMuted() && (dir > 0 || g_settings.current_volume > 0)) {
|
||||||
hideVolscale();
|
hideVolscale();
|
||||||
CAudioMute::getInstance()->AudioMute(false, true);
|
CAudioMute::getInstance()->AudioMute(false, true);
|
||||||
if (mode == CNeutrinoApp::mode_audio) {
|
|
||||||
CAudioPlayerGui *cap = CMediaPlayerMenu::getInstance()->getPlayerInstance();
|
|
||||||
if (cap != NULL)
|
|
||||||
cap->refreshMuteIcon();
|
|
||||||
}
|
|
||||||
setVolume(msg);
|
setVolume(msg);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -126,11 +121,6 @@ void CVolume::setVolume(const neutrino_msg_t key)
|
|||||||
if (g_settings.show_mute_icon) {
|
if (g_settings.show_mute_icon) {
|
||||||
hideVolscale();
|
hideVolscale();
|
||||||
CAudioMute::getInstance()->AudioMute(true, true);
|
CAudioMute::getInstance()->AudioMute(true, true);
|
||||||
if (mode == CNeutrinoApp::mode_audio) {
|
|
||||||
CAudioPlayerGui *cap = CMediaPlayerMenu::getInstance()->getPlayerInstance();
|
|
||||||
if (cap != NULL)
|
|
||||||
cap->refreshMuteIcon();
|
|
||||||
}
|
|
||||||
setVolume(msg);
|
setVolume(msg);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@@ -60,7 +60,7 @@ void CAudioMute::AudioMute(int newValue, bool isEvent)
|
|||||||
neutrino->setCurrentMuted(newValue);
|
neutrino->setCurrentMuted(newValue);
|
||||||
g_Zapit->muteAudio(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);
|
CVolumeHelper::getInstance()->getMuteIconDimensions(&x, &y, &width, &height);
|
||||||
if ((y_old != y)) {
|
if ((y_old != y)) {
|
||||||
@@ -92,12 +92,6 @@ void CAudioMute::AudioMute(int newValue, bool isEvent)
|
|||||||
if (doInit)
|
if (doInit)
|
||||||
CVolumeHelper::getInstance()->refresh();
|
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)
|
void CAudioMute::enableMuteIcon(bool enable)
|
||||||
|
@@ -281,8 +281,6 @@ int CAudioPlayerGui::exec(CMenuTarget* parent, const std::string &actionKey)
|
|||||||
m_fheight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getHeight();
|
m_fheight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getHeight();
|
||||||
|
|
||||||
int iw, ih;
|
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_frameBuffer->getIconSize(NEUTRINO_ICON_MP3, &iw, &ih);
|
||||||
m_theight = std::max(m_theight, ih+4);
|
m_theight = std::max(m_theight, ih+4);
|
||||||
|
|
||||||
@@ -901,8 +899,6 @@ int CAudioPlayerGui::show()
|
|||||||
ret = menu_return::RETURN_EXIT_ALL;
|
ret = menu_return::RETURN_EXIT_ALL;
|
||||||
loop = false;
|
loop = false;
|
||||||
}
|
}
|
||||||
// update mute icon
|
|
||||||
paintHead();
|
|
||||||
paintLCD();
|
paintLCD();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1650,9 +1646,6 @@ void CAudioPlayerGui::paintHead()
|
|||||||
if (m_inetmode)
|
if (m_inetmode)
|
||||||
header.setCaption(LOCALE_INETRADIO_NAME);
|
header.setCaption(LOCALE_INETRADIO_NAME);
|
||||||
|
|
||||||
if (CNeutrinoApp::getInstance()->isMuted())
|
|
||||||
header.addButtonIcon(NEUTRINO_ICON_BUTTON_MUTE_SMALL);
|
|
||||||
|
|
||||||
#ifdef ENABLE_GUI_MOUNT
|
#ifdef ENABLE_GUI_MOUNT
|
||||||
if (!m_inetmode)
|
if (!m_inetmode)
|
||||||
header.addButtonIcon(NEUTRINO_ICON_BUTTON_MENU);
|
header.addButtonIcon(NEUTRINO_ICON_BUTTON_MENU);
|
||||||
|
@@ -261,7 +261,6 @@ class CAudioPlayerGui : public CMenuTarget
|
|||||||
bool playNext(bool allow_rotate = false);
|
bool playNext(bool allow_rotate = false);
|
||||||
bool playPrev(bool allow_rotate = false);
|
bool playPrev(bool allow_rotate = false);
|
||||||
int getAudioPlayerM_current() {return m_current;}
|
int getAudioPlayerM_current() {return m_current;}
|
||||||
void refreshMuteIcon() { paintHead(); }
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@@ -91,11 +91,9 @@ int CMediaPlayerMenu::exec(CMenuTarget* parent, const std::string &actionKey)
|
|||||||
CAudioMute *audiomute = CAudioMute::getInstance();
|
CAudioMute *audiomute = CAudioMute::getInstance();
|
||||||
if (actionKey == "audioplayer")
|
if (actionKey == "audioplayer")
|
||||||
{
|
{
|
||||||
audiomute->enableMuteIcon(false);
|
|
||||||
if (audioPlayer == NULL)
|
if (audioPlayer == NULL)
|
||||||
audioPlayer = new CAudioPlayerGui();
|
audioPlayer = new CAudioPlayerGui();
|
||||||
int res = audioPlayer->exec(NULL, "init");
|
int res = audioPlayer->exec(NULL, "init");
|
||||||
audiomute->enableMuteIcon(true);
|
|
||||||
return res /*menu_return::RETURN_REPAINT*/;
|
return res /*menu_return::RETURN_REPAINT*/;
|
||||||
}
|
}
|
||||||
else if (actionKey == "inetplayer")
|
else if (actionKey == "inetplayer")
|
||||||
|
@@ -637,8 +637,7 @@ int CPictureViewerGui::show()
|
|||||||
}
|
}
|
||||||
hide();
|
hide();
|
||||||
|
|
||||||
if (!audioplayer)
|
CAudioMute::getInstance()->enableMuteIcon(true);
|
||||||
CAudioMute::getInstance()->enableMuteIcon(true);
|
|
||||||
|
|
||||||
return(res);
|
return(res);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user