mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-29 16:31:05 +02:00
CAudioMute: replace unnecessary declaration/definition/ usages
frameBuffer is already definied by
inherited CComponentsPicture() attributes. Attributes like
"x, y, width, height" are usable without a function.
See also http://www.tuxbox.org/neutrinohd/doc/html/class_c_components.html
section: "Protected Attributes"
Origin commit data
------------------
Commit: 999c659b3c
Author: Thilo Graf <dbt@novatux.de>
Date: 2013-05-16 (Thu, 16 May 2013)
This commit is contained in:
@@ -62,33 +62,32 @@ void CAudioMute::AudioMute(int newValue, bool isEvent)
|
||||
|
||||
if( isEvent && ( neutrino->getMode() != CNeutrinoApp::mode_scart ) && ( neutrino->getMode() != CNeutrinoApp::mode_audio) && ( neutrino->getMode() != CNeutrinoApp::mode_pic))
|
||||
{
|
||||
CFrameBuffer *framebuffer = CFrameBuffer::getInstance();
|
||||
CVolumeHelper::getInstance()->getMuteIconDimensions(&x, &y, &width, &height);
|
||||
if ((y_old != y)) {
|
||||
if (do_paint_mute_icon)
|
||||
{
|
||||
framebuffer->fbNoCheck(true);
|
||||
frameBuffer->fbNoCheck(true);
|
||||
this->hide(true);
|
||||
framebuffer->fbNoCheck(false);
|
||||
frameBuffer->fbNoCheck(false);
|
||||
}
|
||||
framebuffer->setFbArea(CFrameBuffer::FB_PAINTAREA_MUTEICON1);
|
||||
frameBuffer->setFbArea(CFrameBuffer::FB_PAINTAREA_MUTEICON1);
|
||||
y_old = y;
|
||||
}
|
||||
if ((g_settings.mode_clock) && (doInit))
|
||||
CInfoClock::getInstance()->ClearDisplay();
|
||||
|
||||
framebuffer->fbNoCheck(true);
|
||||
frameBuffer->fbNoCheck(true);
|
||||
if (newValue) {
|
||||
if (do_paint_mute_icon)
|
||||
this->paint();
|
||||
framebuffer->setFbArea(CFrameBuffer::FB_PAINTAREA_MUTEICON1, this->getXPos(), this->getYPos(), this->getWidth(), this->getHeight());
|
||||
frameBuffer->setFbArea(CFrameBuffer::FB_PAINTAREA_MUTEICON1, x, y, width, height);
|
||||
}
|
||||
else {
|
||||
if (do_paint_mute_icon)
|
||||
this->hide(true);
|
||||
framebuffer->setFbArea(CFrameBuffer::FB_PAINTAREA_MUTEICON1);
|
||||
frameBuffer->setFbArea(CFrameBuffer::FB_PAINTAREA_MUTEICON1);
|
||||
}
|
||||
framebuffer->fbNoCheck(false);
|
||||
frameBuffer->fbNoCheck(false);
|
||||
|
||||
if (doInit)
|
||||
CVolumeHelper::getInstance()->refresh();
|
||||
@@ -98,9 +97,8 @@ void CAudioMute::AudioMute(int newValue, bool isEvent)
|
||||
void CAudioMute::enableMuteIcon(bool enable)
|
||||
{
|
||||
CNeutrinoApp *neutrino = CNeutrinoApp::getInstance();
|
||||
CFrameBuffer *framebuffer = CFrameBuffer::getInstance();
|
||||
if (enable) {
|
||||
framebuffer->doPaintMuteIcon(true);
|
||||
frameBuffer->doPaintMuteIcon(true);
|
||||
do_paint_mute_icon = true;
|
||||
if (neutrino->isMuted())
|
||||
this->paint();
|
||||
@@ -108,7 +106,7 @@ void CAudioMute::enableMuteIcon(bool enable)
|
||||
else {
|
||||
if (neutrino->isMuted())
|
||||
this->hide(true);
|
||||
framebuffer->doPaintMuteIcon(false);
|
||||
frameBuffer->doPaintMuteIcon(false);
|
||||
do_paint_mute_icon = false;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user