From dae411b002592112bd72ee7a488c8cc6663d416c Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Thu, 16 May 2013 22:11:36 +0200 Subject: [PATCH] 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: https://github.com/neutrino-images/ni-neutrino/commit/999c659b3ca53a06516e741209629da00fa33877 Author: Thilo Graf Date: 2013-05-16 (Thu, 16 May 2013) --- src/gui/audiomute.cpp | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/src/gui/audiomute.cpp b/src/gui/audiomute.cpp index fa22f6714..97a383bd2 100644 --- a/src/gui/audiomute.cpp +++ b/src/gui/audiomute.cpp @@ -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; } }