Fix paint VolumeBar on InfoViewer

Origin commit data
------------------
Branch: ni/coolstream
Commit: 31e2dae622
Author: Michael Liebmann <tuxcode.bbg@gmail.com>
Date: 2013-06-26 (Wed, 26 Jun 2013)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
Michael Liebmann
2013-06-26 22:36:08 +02:00
parent ca470f6323
commit 99e28fe73d
5 changed files with 60 additions and 24 deletions

View File

@@ -87,16 +87,8 @@ void CVolume::setVolume(const neutrino_msg_t key)
}
}
if (volscale){
volscale->hide();
delete volscale;
volscale = NULL;
}
if (volscale == NULL){
volscale = new CVolumeBar();
volscale->paint();
}
hideVolscale();
showVolscale();
neutrino_msg_data_t data;
uint64_t timeoutEnd;
@@ -111,12 +103,7 @@ void CVolume::setVolume(const neutrino_msg_t key)
(sub_chan_keybind && (msg == CRCInput::RC_right || msg == CRCInput::RC_left))) {
int dir = (msg == CRCInput::RC_plus || msg == CRCInput::RC_right) ? 1 : -1;
if (CNeutrinoApp::getInstance()->isMuted() && (dir > 0 || g_settings.current_volume > 0)) {
if (volscale){
if (volscale->isPainted())
volscale->hide();
delete volscale;
volscale = NULL;
}
hideVolscale();
CAudioMute::getInstance()->AudioMute(false, true);
if (mode == CNeutrinoApp::mode_audio) {
CAudioPlayerGui *cap = CMediaPlayerMenu::getInstance()->getPlayerInstance();
@@ -137,12 +124,7 @@ void CVolume::setVolume(const neutrino_msg_t key)
v = 0;
g_settings.current_volume = 0;
if (g_settings.show_mute_icon) {
if (volscale) {
if (volscale->isPainted())
volscale->hide();
delete volscale;
volscale = NULL;
}
hideVolscale();
CAudioMute::getInstance()->AudioMute(true, true);
if (mode == CNeutrinoApp::mode_audio) {
CAudioPlayerGui *cap = CMediaPlayerMenu::getInstance()->getPlayerInstance();
@@ -187,12 +169,29 @@ void CVolume::setVolume(const neutrino_msg_t key)
}
} while (msg != CRCInput::RC_timeout);
hideVolscale();
}
bool CVolume::hideVolscale()
{
bool ret = false;
if (volscale) {
if (volscale->isPainted())
if (volscale->isPainted()) {
volscale->hide();
ret = true;
}
delete volscale;
volscale = NULL;
}
return ret;
}
void CVolume::showVolscale()
{
if (volscale == NULL){
volscale = new CVolumeBar();
volscale->paint();
}
}
bool CVolume::changeNotify(const neutrino_locale_t OptionName, void * data)