mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-28 16:01:10 +02:00
neutrino: GUI Painting of Vol. Mute and Clock (Part3)
- Use new class for volumebar
- Numeric display added for volumebar (switchable)
- Display of volumebar, mute icon and info clock optimized (top right)
- Volumebar better scalable
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-beta@2153 e54a6e83-5905-42d5-8d5c-058d10e6a962
Origin commit data
------------------
Branch: ni/coolstream
Commit: 6a5ffc315f
Author: Michael Liebmann <tuxcode.bbg@gmail.com>
Date: 2012-03-18 (Sun, 18 Mar 2012)
Origin message was:
------------------
* neutrino: GUI Painting of Vol. Mute and Clock (Part3)
- Use new class for volumebar
- Numeric display added for volumebar (switchable)
- Display of volumebar, mute icon and info clock optimized (top right)
- Volumebar better scalable
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-beta@2153 e54a6e83-5905-42d5-8d5c-058d10e6a962
------------------
This commit was generated by Migit
This commit is contained in:
@@ -34,7 +34,8 @@ libneutrino_driver_a_SOURCES = \
|
|||||||
radiotext.cpp \
|
radiotext.cpp \
|
||||||
fade.cpp \
|
fade.cpp \
|
||||||
screenshot.cpp \
|
screenshot.cpp \
|
||||||
ringbuffer.c
|
ringbuffer.c \
|
||||||
|
volume.cpp
|
||||||
|
|
||||||
if BOXTYPE_COOL
|
if BOXTYPE_COOL
|
||||||
libneutrino_driver_a_SOURCES += \
|
libneutrino_driver_a_SOURCES += \
|
||||||
|
327
src/driver/volume.cpp
Normal file
327
src/driver/volume.cpp
Normal file
@@ -0,0 +1,327 @@
|
|||||||
|
/*
|
||||||
|
volume bar - Neutrino-GUI
|
||||||
|
|
||||||
|
Copyright (C) 2001 Steffen Hehn 'McClean'
|
||||||
|
and some other guys
|
||||||
|
Homepage: http://dbox.cyberphoria.org/
|
||||||
|
|
||||||
|
Copyright (C) 2011-2012 M. Liebmann (micha-bbg)
|
||||||
|
|
||||||
|
License: GPL
|
||||||
|
|
||||||
|
This library is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU Library General Public
|
||||||
|
License as published by the Free Software Foundation; either
|
||||||
|
version 2 of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This library is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
Library General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Library General Public
|
||||||
|
License along with this library; if not, write to the
|
||||||
|
Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
|
||||||
|
Boston, MA 02110-1301, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include <config.h>
|
||||||
|
#endif
|
||||||
|
#include <global.h>
|
||||||
|
#include <neutrino.h>
|
||||||
|
#include <gui/infoclock.h>
|
||||||
|
#include <gui/keybind_setup.h>
|
||||||
|
#include <system/debug.h>
|
||||||
|
#include <audio_cs.h>
|
||||||
|
#include <system/settings.h>
|
||||||
|
#include <daemonc/remotecontrol.h>
|
||||||
|
#include <driver/framebuffer.h>
|
||||||
|
#include <driver/volume.h>
|
||||||
|
|
||||||
|
#if HAVE_COOL_HARDWARE
|
||||||
|
#include <gui/widget/progressbar.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
CFrameBuffer * frameBuffer;
|
||||||
|
CRemoteControl * v_RemoteControl;
|
||||||
|
extern cAudio * audioDecoder;
|
||||||
|
static CProgressBar *g_volscale = NULL;
|
||||||
|
|
||||||
|
CVolume::CVolume()
|
||||||
|
{
|
||||||
|
frameBuffer = CFrameBuffer::getInstance();
|
||||||
|
g_Zapit = new CZapitClient;
|
||||||
|
g_RCInput = new CRCInput;
|
||||||
|
v_RemoteControl = new CRemoteControl;
|
||||||
|
VolumeFont = SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO;
|
||||||
|
paintDigits = true; // For future On/Off digits
|
||||||
|
paintShadow = false; // For future On/Off switch shadow
|
||||||
|
MuteIconFrame = false; // For future On/Off switch IconFrame
|
||||||
|
ShadowOffset = 4;
|
||||||
|
mute_ay = 0;
|
||||||
|
|
||||||
|
Init();
|
||||||
|
}
|
||||||
|
|
||||||
|
CVolume::~CVolume()
|
||||||
|
{
|
||||||
|
if (g_volscale)
|
||||||
|
delete g_volscale;
|
||||||
|
}
|
||||||
|
|
||||||
|
void CVolume::Init()
|
||||||
|
{
|
||||||
|
mute_ay_old = mute_ay;
|
||||||
|
int faktor_h = 18; // scale * 10
|
||||||
|
int clock_height= 0;
|
||||||
|
int clock_width = 0;
|
||||||
|
int x_corr = 0;
|
||||||
|
pB = 2; // progress border
|
||||||
|
spacer = 8;
|
||||||
|
|
||||||
|
colBar = COL_MENUCONTENT_PLUS_0;
|
||||||
|
colFrame = COL_MENUCONTENT_PLUS_3;
|
||||||
|
colContent = COL_MENUCONTENT;
|
||||||
|
colShadow = COL_MENUCONTENTDARK_PLUS_0;
|
||||||
|
|
||||||
|
x = frameBuffer->getScreenX();
|
||||||
|
y = sy = frameBuffer->getScreenY() + spacer / 2;
|
||||||
|
sw = g_settings.screen_EndX - spacer;
|
||||||
|
sh = frameBuffer->getScreenHeight();
|
||||||
|
|
||||||
|
frameBuffer->getIconSize(NEUTRINO_ICON_VOLUME, &icon_w, &icon_h);
|
||||||
|
vbar_h = std::max((icon_h * faktor_h) / 10, digit_h+digit_offset);
|
||||||
|
progress_h = icon_h - 2*pB;
|
||||||
|
progress_w = 200;
|
||||||
|
vbar_w = spacer + icon_w + spacer + progress_w + spacer;
|
||||||
|
if (paintDigits) {
|
||||||
|
digit_w = g_Font[VolumeFont]->getRenderWidth("100");
|
||||||
|
digit_offset = g_Font[VolumeFont]->getDigitOffset();
|
||||||
|
digit_h = g_Font[VolumeFont]->getDigitHeight();
|
||||||
|
progress_h = std::max(icon_h, digit_h) - 2*pB;
|
||||||
|
vbar_w += digit_w;
|
||||||
|
}
|
||||||
|
|
||||||
|
g_volscale = new CProgressBar(true, progress_w, progress_h, 50, 100, 80, true);
|
||||||
|
|
||||||
|
// mute icon
|
||||||
|
mute_icon_dx = 0;
|
||||||
|
mute_icon_dy = 0;
|
||||||
|
frameBuffer->getIconSize(NEUTRINO_ICON_BUTTON_MUTE, &mute_icon_dx, &mute_icon_dy);
|
||||||
|
mute_dx = mute_icon_dx;
|
||||||
|
mute_dy = mute_icon_dy;
|
||||||
|
mute_dx += mute_icon_dx / 4;
|
||||||
|
mute_dy += mute_icon_dx / 4;
|
||||||
|
mute_ax = sw - mute_dx;
|
||||||
|
mute_ay = y;
|
||||||
|
|
||||||
|
if ((g_settings.mode_clock) && (g_settings.volume_pos == 0)) {
|
||||||
|
// Clock and MuteIcon in a line.
|
||||||
|
clock_height = CInfoClock::getInstance(true)->time_height;
|
||||||
|
clock_width = CInfoClock::getInstance(true)->time_width;
|
||||||
|
mute_ay += (clock_height - mute_dy) / 2;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// Volume level and MuteIcon in a line.
|
||||||
|
if (mute_dy > vbar_h)
|
||||||
|
y += (mute_dy - vbar_h) / 2;
|
||||||
|
else
|
||||||
|
mute_ay += (vbar_h - mute_dy) / 2;
|
||||||
|
}
|
||||||
|
if ((g_settings.mode_clock) && (!CNeutrinoApp::getInstance()->isMuted()))
|
||||||
|
frameBuffer->paintBackgroundBoxRel(sw - clock_width, y, clock_width, clock_height);
|
||||||
|
//printf("\n##### [volume.cpp Zeile %d] mute_ax %d, mute_dx %d\n \n", __LINE__, mute_ax, mute_dx);
|
||||||
|
switch (g_settings.volume_pos)
|
||||||
|
{
|
||||||
|
case 0:// upper right
|
||||||
|
if (CNeutrinoApp::getInstance()->isMuted())
|
||||||
|
x_corr = mute_dx + spacer;
|
||||||
|
x = sw - vbar_w - x_corr;
|
||||||
|
if (g_settings.mode_clock)
|
||||||
|
y += clock_height + spacer / 2;
|
||||||
|
break;
|
||||||
|
case 1:// upper left
|
||||||
|
break;
|
||||||
|
case 2:// bottom left
|
||||||
|
y = sh - vbar_h;
|
||||||
|
break;
|
||||||
|
case 3:// bottom right
|
||||||
|
x = sw - vbar_w;
|
||||||
|
y = sh - vbar_h;
|
||||||
|
break;
|
||||||
|
case 4:// center default
|
||||||
|
x = ((sw - vbar_w) / 2) + x;
|
||||||
|
break;
|
||||||
|
case 5:// center higher
|
||||||
|
x = ((sw - vbar_w) / 2) + x;
|
||||||
|
y = sh - sh/15;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
icon_x = x + spacer;
|
||||||
|
icon_y = y + ((vbar_h - icon_h) / 2);
|
||||||
|
progress_x = icon_x + icon_w + spacer;
|
||||||
|
progress_y = y + ((vbar_h - progress_h) / 2);
|
||||||
|
if (paintDigits) {
|
||||||
|
digit_x = progress_x + progress_w + spacer/2;
|
||||||
|
digit_y = y + digit_h + digit_offset + ((vbar_h - digit_h) / 2);
|
||||||
|
digit_b_x = digit_x - spacer/4;
|
||||||
|
digit_b_w = vbar_w - (digit_b_x - x);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
CVolume* CVolume::getInstance()
|
||||||
|
{
|
||||||
|
static CVolume* Volume = NULL;
|
||||||
|
if(!Volume)
|
||||||
|
Volume = new CVolume();
|
||||||
|
return Volume;
|
||||||
|
}
|
||||||
|
|
||||||
|
void CVolume::AudioMute(int newValue, bool isEvent)
|
||||||
|
{
|
||||||
|
if((g_settings.current_volume == 0) && (g_settings.show_mute_icon == 1))
|
||||||
|
return;
|
||||||
|
CNeutrinoApp* neutrino = CNeutrinoApp::getInstance();
|
||||||
|
bool doInit = newValue != (int) neutrino->isMuted();
|
||||||
|
|
||||||
|
CVFD::getInstance()->setMuted(newValue);
|
||||||
|
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 ((mute_ay_old != mute_ay) && (mute_ay_old > 0))
|
||||||
|
frameBuffer->paintBackgroundBoxRel(mute_ax, mute_ay_old, mute_dx, mute_dy);
|
||||||
|
if ((g_settings.mode_clock) && (doInit))
|
||||||
|
CInfoClock::getInstance(true)->ClearDisplay();
|
||||||
|
frameBuffer->paintMuteIcon(newValue, mute_ax, mute_ay, mute_dx, mute_dy, MuteIconFrame);
|
||||||
|
if (doInit) {
|
||||||
|
Init();
|
||||||
|
CInfoClock::getInstance(true)->Init(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void CVolume::setvol(int vol)
|
||||||
|
{
|
||||||
|
audioDecoder->setVolume(vol, vol);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CVolume::setVolume(const neutrino_msg_t key, const bool bDoPaint, bool nowait)
|
||||||
|
{
|
||||||
|
neutrino_msg_t msg = key;
|
||||||
|
int vol = g_settings.current_volume;
|
||||||
|
fb_pixel_t * pixbuf = NULL;
|
||||||
|
|
||||||
|
if(bDoPaint) {
|
||||||
|
pixbuf = new fb_pixel_t[(vbar_w+ShadowOffset) * (vbar_h+ShadowOffset)];
|
||||||
|
if(pixbuf!= NULL)
|
||||||
|
frameBuffer->SaveScreen(x, y, vbar_w+ShadowOffset, vbar_h+ShadowOffset, pixbuf);
|
||||||
|
|
||||||
|
// volumebar shadow
|
||||||
|
if (paintShadow)
|
||||||
|
frameBuffer->paintBoxRel(x+ShadowOffset , y+ShadowOffset , (paintDigits) ? vbar_w - vbar_h : vbar_w, vbar_h, colShadow, ROUNDED, CORNER_TOP_LEFT | CORNER_BOTTOM_LEFT);
|
||||||
|
// volumebar
|
||||||
|
frameBuffer->paintBoxRel(x , y , (paintDigits) ? vbar_w - vbar_h : vbar_w, vbar_h, colBar, ROUNDED, CORNER_TOP_LEFT | CORNER_BOTTOM_LEFT);
|
||||||
|
// frame for progress
|
||||||
|
frameBuffer->paintBoxRel(progress_x-pB, progress_y-pB, progress_w+pB*1, progress_h+pB*2, colFrame);
|
||||||
|
// volume icon
|
||||||
|
frameBuffer->paintIcon(NEUTRINO_ICON_VOLUME, icon_x, icon_y, 0, colBar);
|
||||||
|
|
||||||
|
g_volscale->reset();
|
||||||
|
refreshVolumebar(vol);
|
||||||
|
}
|
||||||
|
|
||||||
|
neutrino_msg_data_t data;
|
||||||
|
uint64_t timeoutEnd;
|
||||||
|
|
||||||
|
do {
|
||||||
|
if (msg <= CRCInput::RC_MaxRC)
|
||||||
|
{
|
||||||
|
int sub_chan_keybind = 0;
|
||||||
|
if (g_settings.mode_left_right_key_tv == SNeutrinoSettings::VOLUME && v_RemoteControl->subChannels.size() < 1)
|
||||||
|
sub_chan_keybind = 1;
|
||||||
|
|
||||||
|
if ((msg == CRCInput::RC_plus) || (sub_chan_keybind == 1 && (msg == CRCInput::RC_right))) {
|
||||||
|
if (g_settings.current_volume < 100 - g_settings.current_volume_step)
|
||||||
|
g_settings.current_volume += g_settings.current_volume_step;
|
||||||
|
else
|
||||||
|
g_settings.current_volume = 100;
|
||||||
|
|
||||||
|
if(CNeutrinoApp::getInstance()->isMuted()) {
|
||||||
|
if ((bDoPaint) && (pixbuf!= NULL)) {
|
||||||
|
frameBuffer->RestoreScreen(x, y, vbar_w+ShadowOffset, vbar_h+ShadowOffset, pixbuf);
|
||||||
|
delete [] pixbuf;
|
||||||
|
}
|
||||||
|
AudioMute(false, true);
|
||||||
|
Init();
|
||||||
|
setVolume(msg);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if ((msg == CRCInput::RC_minus) || (sub_chan_keybind == 1 && (msg == CRCInput::RC_left))) {
|
||||||
|
if (g_settings.current_volume > g_settings.current_volume_step)
|
||||||
|
g_settings.current_volume -= g_settings.current_volume_step;
|
||||||
|
else if ((g_settings.show_mute_icon == 1) && (g_settings.current_volume = 1)) {
|
||||||
|
(g_settings.current_volume = 1);
|
||||||
|
AudioMute( true, true);
|
||||||
|
g_settings.current_volume = 0;
|
||||||
|
}
|
||||||
|
else if (g_settings.show_mute_icon == 0)
|
||||||
|
g_settings.current_volume = 0;
|
||||||
|
}
|
||||||
|
else if (msg == CRCInput::RC_home)
|
||||||
|
break;
|
||||||
|
else {
|
||||||
|
g_RCInput->postMsg(msg, data);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
setvol(g_settings.current_volume);
|
||||||
|
timeoutEnd = CRCInput::calcTimeoutEnd(nowait ? 1 : 3);
|
||||||
|
}
|
||||||
|
else if (msg == NeutrinoMessages::EVT_VOLCHANGED) {
|
||||||
|
timeoutEnd = CRCInput::calcTimeoutEnd(3);
|
||||||
|
}
|
||||||
|
else if (CNeutrinoApp::getInstance()->handleMsg(msg, data) & messages_return::unhandled) {
|
||||||
|
g_RCInput->postMsg(msg, data);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (bDoPaint) {
|
||||||
|
if(vol != g_settings.current_volume) {
|
||||||
|
vol = g_settings.current_volume;
|
||||||
|
refreshVolumebar(g_settings.current_volume);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
CVFD::getInstance()->showVolume(g_settings.current_volume);
|
||||||
|
if (msg != CRCInput::RC_timeout) {
|
||||||
|
g_RCInput->getMsgAbsoluteTimeout(&msg, &data, &timeoutEnd, true );
|
||||||
|
}
|
||||||
|
} while (msg != CRCInput::RC_timeout);
|
||||||
|
|
||||||
|
if( (bDoPaint) && (pixbuf!= NULL) ) {
|
||||||
|
frameBuffer->RestoreScreen(x, y, vbar_w+ShadowOffset, vbar_h+ShadowOffset, pixbuf);
|
||||||
|
delete [] pixbuf;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void CVolume::refreshVolumebar(int current_volume)
|
||||||
|
{
|
||||||
|
// progressbar
|
||||||
|
g_volscale->paintProgressBar2(progress_x, progress_y, current_volume);
|
||||||
|
if (paintDigits) {
|
||||||
|
// shadow for erase digits
|
||||||
|
if (paintShadow)
|
||||||
|
frameBuffer->paintBoxRel(digit_b_x+ShadowOffset, y+ShadowOffset, digit_b_w, vbar_h, colShadow, ROUNDED, CORNER_TOP_RIGHT | CORNER_BOTTOM_RIGHT);
|
||||||
|
// erase digits
|
||||||
|
frameBuffer->paintBoxRel(digit_b_x, y, digit_b_w, vbar_h, colBar, ROUNDED, CORNER_TOP_RIGHT | CORNER_BOTTOM_RIGHT);
|
||||||
|
// digits
|
||||||
|
char buff[4];
|
||||||
|
snprintf(buff, 4, "%3d", current_volume);
|
||||||
|
g_Font[VolumeFont]->RenderString(digit_x, digit_y, digit_w, buff, colContent);
|
||||||
|
}
|
||||||
|
}
|
65
src/driver/volume.h
Normal file
65
src/driver/volume.h
Normal file
@@ -0,0 +1,65 @@
|
|||||||
|
/*
|
||||||
|
volume bar - Neutrino-GUI
|
||||||
|
|
||||||
|
Copyright (C) 2001 Steffen Hehn 'McClean'
|
||||||
|
and some other guys
|
||||||
|
Homepage: http://dbox.cyberphoria.org/
|
||||||
|
|
||||||
|
Copyright (C) 2011-2012 M. Liebmann (micha-bbg)
|
||||||
|
|
||||||
|
License: GPL
|
||||||
|
|
||||||
|
This library is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU Library General Public
|
||||||
|
License as published by the Free Software Foundation; either
|
||||||
|
version 2 of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This library is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
Library General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Library General Public
|
||||||
|
License along with this library; if not, write to the
|
||||||
|
Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
|
||||||
|
Boston, MA 02110-1301, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __CVOLUME__
|
||||||
|
#define __CVOLUME__
|
||||||
|
|
||||||
|
#define ROUNDED g_settings.rounded_corners ? vbar_h/2 : 0
|
||||||
|
|
||||||
|
class CVolume
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
void refreshVolumebar(int current_volume);
|
||||||
|
|
||||||
|
int x, y, sy, sw, sh;
|
||||||
|
int mute_ax, mute_ay, mute_dy, mute_ay_old;
|
||||||
|
int mute_icon_dx, mute_icon_dy;
|
||||||
|
int icon_w, icon_h, icon_x, icon_y;
|
||||||
|
int vbar_w, vbar_h;
|
||||||
|
int progress_w, progress_h, progress_x, progress_y, pB;
|
||||||
|
int digit_w, digit_h, digit_offset, digit_x, digit_y, digit_b_x, digit_b_w;
|
||||||
|
int VolumeFont, colShadow, colBar, colFrame, colContent;
|
||||||
|
int ShadowOffset;
|
||||||
|
int rounded;
|
||||||
|
bool paintShadow, paintDigits, MuteIconFrame;
|
||||||
|
|
||||||
|
public:
|
||||||
|
CVolume();
|
||||||
|
~CVolume();
|
||||||
|
static CVolume* getInstance();
|
||||||
|
|
||||||
|
int spacer, mute_dx;
|
||||||
|
void Init();
|
||||||
|
void AudioMute(int newValue, bool isEvent= false);
|
||||||
|
void setvol(int vol);
|
||||||
|
void setVolume(const neutrino_msg_t key, const bool bDoPaint = true, bool nowait = false);
|
||||||
|
int getStartPosTop(){ return sy; }
|
||||||
|
int getEndPosRight(){ return sw; }
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#endif // __CVOLUME__
|
@@ -10,16 +10,17 @@
|
|||||||
#include <sys/timeb.h>
|
#include <sys/timeb.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#include "infoclock.h"
|
#include <driver/volume.h>
|
||||||
|
#include <gui/infoclock.h>
|
||||||
|
|
||||||
#define YOFF 0
|
#define YOFF 0
|
||||||
|
|
||||||
CInfoClock::CInfoClock()
|
CInfoClock::CInfoClock(bool noVolume)
|
||||||
{
|
{
|
||||||
frameBuffer = CFrameBuffer::getInstance();
|
frameBuffer = CFrameBuffer::getInstance();
|
||||||
x = y = clock_x = 0;
|
x = y = clock_x = 0;
|
||||||
time_height = time_width = thrTimer = 0;
|
time_height = time_width = thrTimer = 0;
|
||||||
Init();
|
Init(noVolume);
|
||||||
}
|
}
|
||||||
|
|
||||||
CInfoClock::~CInfoClock()
|
CInfoClock::~CInfoClock()
|
||||||
@@ -29,23 +30,34 @@ CInfoClock::~CInfoClock()
|
|||||||
thrTimer = 0;
|
thrTimer = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CInfoClock::Init()
|
void CInfoClock::Init(bool noVolume)
|
||||||
{
|
{
|
||||||
//TOTO Give me a framebuffer->getScreenEndX ();
|
static int mute_dx = 0;
|
||||||
x = frameBuffer->getScreenWidth() + frameBuffer->getScreenX();
|
static int spacer = 0;
|
||||||
y = frameBuffer->getScreenY();
|
if (!noVolume) {
|
||||||
|
x = CVolume::getInstance()->getEndPosRight();
|
||||||
|
y = CVolume::getInstance()->getStartPosTop();
|
||||||
|
mute_dx = CVolume::getInstance()->mute_dx;
|
||||||
|
spacer = CVolume::getInstance()->spacer;
|
||||||
|
}
|
||||||
|
|
||||||
time_height = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_CHANNAME]->getHeight();
|
digit_offset = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_CHANNAME]->getDigitOffset();
|
||||||
int t1 = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_CHANNAME]->getRenderWidth(widest_number);
|
digit_h = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_CHANNAME]->getDigitHeight();
|
||||||
int t2 = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_CHANNAME]->getRenderWidth(":");
|
int t1 = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_CHANNAME]->getRenderWidth(widest_number);
|
||||||
time_width = t1*6 + t2*2;
|
int t2 = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_CHANNAME]->getRenderWidth(":");
|
||||||
|
time_height = digit_h + (int)((float)digit_offset * 1.5);
|
||||||
|
time_width = t1*6 + t2*2;
|
||||||
|
clock_x = x - time_width;
|
||||||
|
if (CNeutrinoApp::getInstance()->isMuted())
|
||||||
|
clock_x -= (mute_dx + spacer);
|
||||||
|
}
|
||||||
|
|
||||||
int dvx, dummy;
|
CInfoClock* CInfoClock::getInstance(bool noVolume)
|
||||||
frameBuffer->getIconSize(NEUTRINO_ICON_BUTTON_MUTE,&dvx,&dummy);
|
{
|
||||||
dvx += (dvx/4);
|
static CInfoClock* InfoClock = NULL;
|
||||||
|
if(!InfoClock)
|
||||||
x -= dvx;
|
InfoClock = new CInfoClock(noVolume);
|
||||||
clock_x = x - time_width - 10;
|
return InfoClock;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CInfoClock::paintTime( bool show_dot)
|
void CInfoClock::paintTime( bool show_dot)
|
||||||
@@ -57,7 +69,7 @@ void CInfoClock::paintTime( bool show_dot)
|
|||||||
|
|
||||||
int x_diff = (time_width - g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_CHANNAME]->getRenderWidth(timestr)) / 2;
|
int x_diff = (time_width - g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_CHANNAME]->getRenderWidth(timestr)) / 2;
|
||||||
frameBuffer->paintBoxRel(clock_x, y, time_width, time_height, COL_MENUCONTENT_PLUS_0, RADIUS_SMALL);
|
frameBuffer->paintBoxRel(clock_x, y, time_width, time_height, COL_MENUCONTENT_PLUS_0, RADIUS_SMALL);
|
||||||
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_CHANNAME]->RenderString(clock_x + x_diff, y + time_height, time_width, timestr, COL_MENUCONTENT);
|
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_CHANNAME]->RenderString(clock_x + x_diff, y + digit_h + digit_offset + ((time_height - digit_h) / 2), time_width, timestr, COL_MENUCONTENT);
|
||||||
}
|
}
|
||||||
|
|
||||||
void* CInfoClock::TimerProc(void *arg)
|
void* CInfoClock::TimerProc(void *arg)
|
||||||
@@ -77,9 +89,15 @@ void* CInfoClock::TimerProc(void *arg)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CInfoClock::ClearDisplay()
|
||||||
|
{
|
||||||
|
frameBuffer->paintBackgroundBoxRel(clock_x, y, time_width, time_height);
|
||||||
|
}
|
||||||
|
|
||||||
void CInfoClock::StartClock()
|
void CInfoClock::StartClock()
|
||||||
{
|
{
|
||||||
Init();
|
Init();
|
||||||
|
CVolume::getInstance()->Init();
|
||||||
|
|
||||||
if(!thrTimer) {
|
if(!thrTimer) {
|
||||||
pthread_create (&thrTimer, NULL, TimerProc, (void*) this) ;
|
pthread_create (&thrTimer, NULL, TimerProc, (void*) this) ;
|
||||||
@@ -89,6 +107,7 @@ void CInfoClock::StartClock()
|
|||||||
|
|
||||||
void CInfoClock::StopClock()
|
void CInfoClock::StopClock()
|
||||||
{
|
{
|
||||||
|
CVolume::getInstance()->Init();
|
||||||
if(thrTimer) {
|
if(thrTimer) {
|
||||||
pthread_cancel(thrTimer);
|
pthread_cancel(thrTimer);
|
||||||
thrTimer = 0;
|
thrTimer = 0;
|
||||||
|
@@ -16,23 +16,24 @@ class CInfoClock
|
|||||||
private:
|
private:
|
||||||
CFrameBuffer * frameBuffer;
|
CFrameBuffer * frameBuffer;
|
||||||
|
|
||||||
pthread_t thrTimer;
|
pthread_t thrTimer;
|
||||||
void Init();
|
void paintTime( bool show_dot);
|
||||||
int time_width;
|
int time_offset, digit_offset, digit_h;
|
||||||
int time_height;
|
int x, y, clock_x;
|
||||||
int clock_x;
|
static void CleanUpProc(void* arg);
|
||||||
void paintTime( bool show_dot);
|
static void* TimerProc(void *arg);
|
||||||
int y,x;
|
|
||||||
static void CleanUpProc(void* arg);
|
|
||||||
static void* TimerProc(void *arg);
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CInfoClock();
|
CInfoClock(bool noVolume=false);
|
||||||
~CInfoClock();
|
~CInfoClock();
|
||||||
|
static CInfoClock* getInstance(bool noVolume=false);
|
||||||
|
|
||||||
void StartClock();
|
void Init(bool noVolume=false);
|
||||||
void StopClock();
|
void StartClock();
|
||||||
|
void StopClock();
|
||||||
|
void ClearDisplay();
|
||||||
|
|
||||||
|
int time_width, time_height;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -53,6 +53,7 @@
|
|||||||
|
|
||||||
#include <driver/screen_max.h>
|
#include <driver/screen_max.h>
|
||||||
#include <driver/screenshot.h>
|
#include <driver/screenshot.h>
|
||||||
|
#include <driver/volume.h>
|
||||||
|
|
||||||
#include <system/debug.h>
|
#include <system/debug.h>
|
||||||
|
|
||||||
@@ -431,10 +432,10 @@ int COsdSetup::showOsdSetup()
|
|||||||
|
|
||||||
osd_menu->addItem(GenericMenuSeparatorLine);
|
osd_menu->addItem(GenericMenuSeparatorLine);
|
||||||
//options
|
//options
|
||||||
osd_menu->addItem(new CMenuOptionChooser(LOCALE_EXTRA_ROUNDED_CORNERS, &g_settings.rounded_corners, MENU_CORNERSETTINGS_TYPE_OPTIONS, MENU_CORNERSETTINGS_TYPE_OPTION_COUNT, true));
|
osd_menu->addItem(new CMenuOptionChooser(LOCALE_EXTRA_ROUNDED_CORNERS, &g_settings.rounded_corners, MENU_CORNERSETTINGS_TYPE_OPTIONS, MENU_CORNERSETTINGS_TYPE_OPTION_COUNT, true, this));
|
||||||
osd_menu->addItem(new CMenuOptionChooser(LOCALE_EXTRA_SCRAMBLED_MESSAGE, &g_settings.scrambled_message, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true));
|
osd_menu->addItem(new CMenuOptionChooser(LOCALE_EXTRA_SCRAMBLED_MESSAGE, &g_settings.scrambled_message, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true));
|
||||||
osd_menu->addItem(new CMenuOptionChooser(LOCALE_INFOVIEWER_SUBCHAN_DISP_POS, &g_settings.infobar_subchan_disp_pos, INFOBAR_SUBCHAN_DISP_POS_OPTIONS, INFOBAR_SUBCHAN_DISP_POS_OPTIONS_COUNT, true));
|
osd_menu->addItem(new CMenuOptionChooser(LOCALE_INFOVIEWER_SUBCHAN_DISP_POS, &g_settings.infobar_subchan_disp_pos, INFOBAR_SUBCHAN_DISP_POS_OPTIONS, INFOBAR_SUBCHAN_DISP_POS_OPTIONS_COUNT, true));
|
||||||
osd_menu->addItem(new CMenuOptionChooser(LOCALE_EXTRA_VOLUME_POS, &g_settings.volume_pos, VOLUMEBAR_DISP_POS_OPTIONS, VOLUMEBAR_DISP_POS_OPTIONS_COUNT, true));
|
osd_menu->addItem(new CMenuOptionChooser(LOCALE_EXTRA_VOLUME_POS, &g_settings.volume_pos, VOLUMEBAR_DISP_POS_OPTIONS, VOLUMEBAR_DISP_POS_OPTIONS_COUNT, true, this));
|
||||||
osd_menu->addItem(new CMenuOptionChooser(LOCALE_EXTRA_SHOW_MUTE_ICON, &g_settings.show_mute_icon, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true));
|
osd_menu->addItem(new CMenuOptionChooser(LOCALE_EXTRA_SHOW_MUTE_ICON, &g_settings.show_mute_icon, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true));
|
||||||
osd_menu->addItem(new CMenuOptionChooser(LOCALE_SETTINGS_MENU_POS, &g_settings.menu_pos, MENU_DISP_POS_OPTIONS, MENU_DISP_POS_OPTIONS_COUNT, true, this));
|
osd_menu->addItem(new CMenuOptionChooser(LOCALE_SETTINGS_MENU_POS, &g_settings.menu_pos, MENU_DISP_POS_OPTIONS, MENU_DISP_POS_OPTIONS_COUNT, true, this));
|
||||||
osd_menu->addItem(new CMenuOptionChooser(LOCALE_COLORMENU_FADE, &g_settings.widget_fade, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true ));
|
osd_menu->addItem(new CMenuOptionChooser(LOCALE_COLORMENU_FADE, &g_settings.widget_fade, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true ));
|
||||||
@@ -664,6 +665,11 @@ bool COsdSetup::changeNotify(const neutrino_locale_t OptionName, void * data)
|
|||||||
g_InfoViewer->changePB();
|
g_InfoViewer->changePB();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
else if ((ARE_LOCALES_EQUAL(OptionName, LOCALE_EXTRA_VOLUME_POS)) ||
|
||||||
|
(ARE_LOCALES_EQUAL(OptionName, LOCALE_EXTRA_ROUNDED_CORNERS))) {
|
||||||
|
CVolume::getInstance()->Init();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -43,6 +43,7 @@
|
|||||||
#include <driver/rcinput.h>
|
#include <driver/rcinput.h>
|
||||||
#include <driver/screen_max.h>
|
#include <driver/screen_max.h>
|
||||||
#include <driver/record.h>
|
#include <driver/record.h>
|
||||||
|
#include <driver/volume.h>
|
||||||
|
|
||||||
#include <gui/color.h>
|
#include <gui/color.h>
|
||||||
|
|
||||||
@@ -439,7 +440,7 @@ int CScanTs::handleMsg(neutrino_msg_t msg, neutrino_msg_data_t data)
|
|||||||
case CRCInput::RC_minus:
|
case CRCInput::RC_minus:
|
||||||
case CRCInput::RC_left:
|
case CRCInput::RC_left:
|
||||||
case CRCInput::RC_right:
|
case CRCInput::RC_right:
|
||||||
CNeutrinoApp::getInstance()->setVolume(msg, true, true);
|
CVolume::getInstance()->setVolume(msg, true, true);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
if ((msg >= CRCInput::RC_WithData) && (msg < CRCInput::RC_WithData + 0x10000000))
|
if ((msg >= CRCInput::RC_WithData) && (msg < CRCInput::RC_WithData + 0x10000000))
|
||||||
|
265
src/neutrino.cpp
265
src/neutrino.cpp
@@ -54,6 +54,7 @@
|
|||||||
#include <driver/stream2file.h>
|
#include <driver/stream2file.h>
|
||||||
#include <driver/record.h>
|
#include <driver/record.h>
|
||||||
#include <driver/screenshot.h>
|
#include <driver/screenshot.h>
|
||||||
|
#include <driver/volume.h>
|
||||||
|
|
||||||
#include "gui/audioplayer.h"
|
#include "gui/audioplayer.h"
|
||||||
#include "gui/bouquetlist.h"
|
#include "gui/bouquetlist.h"
|
||||||
@@ -175,6 +176,7 @@ CPlugins * g_PluginList;
|
|||||||
CRemoteControl * g_RemoteControl;
|
CRemoteControl * g_RemoteControl;
|
||||||
CPictureViewer * g_PicViewer;
|
CPictureViewer * g_PicViewer;
|
||||||
CCAMMenuHandler * g_CamHandler;
|
CCAMMenuHandler * g_CamHandler;
|
||||||
|
CVolume * g_volume;
|
||||||
|
|
||||||
// Globale Variablen - to use import global.h
|
// Globale Variablen - to use import global.h
|
||||||
|
|
||||||
@@ -206,6 +208,7 @@ static void initGlobals(void)
|
|||||||
InfoClock = NULL;
|
InfoClock = NULL;
|
||||||
g_CamHandler = NULL;
|
g_CamHandler = NULL;
|
||||||
g_Radiotext = NULL;
|
g_Radiotext = NULL;
|
||||||
|
g_volume = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||||
@@ -226,9 +229,9 @@ CNeutrinoApp::CNeutrinoApp()
|
|||||||
TVchannelList = NULL;
|
TVchannelList = NULL;
|
||||||
RADIOchannelList = NULL;
|
RADIOchannelList = NULL;
|
||||||
networksetup = NULL;
|
networksetup = NULL;
|
||||||
skipShutdownTimer=false;
|
skipShutdownTimer = false;
|
||||||
current_muted = 0;
|
current_muted = 0;
|
||||||
recordingstatus = 0;
|
recordingstatus = 0;
|
||||||
memset(&font, 0, sizeof(neutrino_font_descr_struct));
|
memset(&font, 0, sizeof(neutrino_font_descr_struct));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1735,10 +1738,6 @@ int CNeutrinoApp::run(int argc, char **argv)
|
|||||||
CVFD::getInstance()->showVolume(g_settings.current_volume);
|
CVFD::getInstance()->showVolume(g_settings.current_volume);
|
||||||
CVFD::getInstance()->setMuted(current_muted);
|
CVFD::getInstance()->setMuted(current_muted);
|
||||||
|
|
||||||
InfoClock = new CInfoClock();
|
|
||||||
if(g_settings.mode_clock)
|
|
||||||
InfoClock->StartClock();
|
|
||||||
|
|
||||||
g_RCInput = new CRCInput;
|
g_RCInput = new CRCInput;
|
||||||
|
|
||||||
g_Sectionsd = new CSectionsdClient;
|
g_Sectionsd = new CSectionsdClient;
|
||||||
@@ -1899,11 +1898,11 @@ int CNeutrinoApp::run(int argc, char **argv)
|
|||||||
hdd->exec(NULL, "");
|
hdd->exec(NULL, "");
|
||||||
delete hdd;
|
delete hdd;
|
||||||
|
|
||||||
|
g_volume = CVolume::getInstance();
|
||||||
cCA::GetInstance()->Ready(true);
|
cCA::GetInstance()->Ready(true);
|
||||||
InitZapper();
|
InitZapper();
|
||||||
|
|
||||||
AudioMute( current_muted, true);
|
g_volume->AudioMute(current_muted, true);
|
||||||
|
|
||||||
SHTDCNT::getInstance()->init();
|
SHTDCNT::getInstance()->init();
|
||||||
|
|
||||||
hintBox->hide();
|
hintBox->hide();
|
||||||
@@ -1960,6 +1959,10 @@ void CNeutrinoApp::RealRun(CMenuWidget &mainMenu)
|
|||||||
if(g_settings.power_standby || init_cec_setting)
|
if(g_settings.power_standby || init_cec_setting)
|
||||||
standbyMode(true);
|
standbyMode(true);
|
||||||
|
|
||||||
|
InfoClock = CInfoClock::getInstance();
|
||||||
|
if(g_settings.mode_clock)
|
||||||
|
InfoClock->StartClock();
|
||||||
|
|
||||||
//cCA::GetInstance()->Ready(true);
|
//cCA::GetInstance()->Ready(true);
|
||||||
|
|
||||||
while( true ) {
|
while( true ) {
|
||||||
@@ -1998,7 +2001,9 @@ void CNeutrinoApp::RealRun(CMenuWidget &mainMenu)
|
|||||||
//if(!g_settings.cacheTXT)
|
//if(!g_settings.cacheTXT)
|
||||||
// tuxtxt_stop();
|
// tuxtxt_stop();
|
||||||
g_RCInput->clearRCMsg();
|
g_RCInput->clearRCMsg();
|
||||||
AudioMute(current_muted, true);
|
// restore mute symbol
|
||||||
|
if (current_muted)
|
||||||
|
g_volume->AudioMute(current_muted, true);
|
||||||
if(g_settings.mode_clock)
|
if(g_settings.mode_clock)
|
||||||
InfoClock->StartClock();
|
InfoClock->StartClock();
|
||||||
StartSubtitles();
|
StartSubtitles();
|
||||||
@@ -2010,7 +2015,8 @@ void CNeutrinoApp::RealRun(CMenuWidget &mainMenu)
|
|||||||
InfoClock->StopClock();
|
InfoClock->StopClock();
|
||||||
mainMenu.exec(NULL, "");
|
mainMenu.exec(NULL, "");
|
||||||
// restore mute symbol
|
// restore mute symbol
|
||||||
AudioMute(current_muted, true);
|
if (current_muted)
|
||||||
|
g_volume->AudioMute(current_muted, true);
|
||||||
if(g_settings.mode_clock)
|
if(g_settings.mode_clock)
|
||||||
InfoClock->StartClock();
|
InfoClock->StartClock();
|
||||||
StartSubtitles();
|
StartSubtitles();
|
||||||
@@ -2024,37 +2030,37 @@ void CNeutrinoApp::RealRun(CMenuWidget &mainMenu)
|
|||||||
switchTvRadioMode(); //used with defined rc key TODO: do we really need this, because we already have a specified key on the remote control
|
switchTvRadioMode(); //used with defined rc key TODO: do we really need this, because we already have a specified key on the remote control
|
||||||
}
|
}
|
||||||
else if( msg == (neutrino_msg_t) g_settings.key_subchannel_up ) {
|
else if( msg == (neutrino_msg_t) g_settings.key_subchannel_up ) {
|
||||||
if(g_RemoteControl->subChannels.size() > 0) {
|
if(g_RemoteControl->subChannels.size() > 0) {
|
||||||
StopSubtitles();
|
StopSubtitles();
|
||||||
g_RemoteControl->subChannelUp();
|
g_RemoteControl->subChannelUp();
|
||||||
g_InfoViewer->showSubchan();
|
g_InfoViewer->showSubchan();
|
||||||
} else if(g_settings.mode_left_right_key_tv == SNeutrinoSettings::VOLUME) {
|
} else if (g_settings.mode_left_right_key_tv == SNeutrinoSettings::VOLUME) {
|
||||||
setVolume(msg, true);
|
g_volume->setVolume(msg, true);
|
||||||
} else if((g_settings.mode_left_right_key_tv == SNeutrinoSettings::VZAP) || (g_settings.mode_left_right_key_tv == SNeutrinoSettings::INFOBAR)) {
|
} else if((g_settings.mode_left_right_key_tv == SNeutrinoSettings::VZAP) || (g_settings.mode_left_right_key_tv == SNeutrinoSettings::INFOBAR)) {
|
||||||
if(channelList->getSize()) {
|
if(channelList->getSize()) {
|
||||||
showInfo();
|
showInfo();
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
quickZap( msg );
|
quickZap( msg );
|
||||||
}
|
}
|
||||||
else if( msg == (neutrino_msg_t) g_settings.key_subchannel_down ) {
|
else if( msg == (neutrino_msg_t) g_settings.key_subchannel_down ) {
|
||||||
if(g_RemoteControl->subChannels.size()> 0) {
|
if(g_RemoteControl->subChannels.size()> 0) {
|
||||||
StopSubtitles();
|
StopSubtitles();
|
||||||
g_RemoteControl->subChannelDown();
|
g_RemoteControl->subChannelDown();
|
||||||
g_InfoViewer->showSubchan();
|
g_InfoViewer->showSubchan();
|
||||||
} else if(g_settings.mode_left_right_key_tv == SNeutrinoSettings::VOLUME) {
|
} else if(g_settings.mode_left_right_key_tv == SNeutrinoSettings::VOLUME) {
|
||||||
setVolume(msg, true);
|
g_volume->setVolume(msg, true);
|
||||||
} else if((g_settings.mode_left_right_key_tv == SNeutrinoSettings::VZAP) || (g_settings.mode_left_right_key_tv == SNeutrinoSettings::INFOBAR)) {
|
} else if((g_settings.mode_left_right_key_tv == SNeutrinoSettings::VZAP) || (g_settings.mode_left_right_key_tv == SNeutrinoSettings::INFOBAR)) {
|
||||||
if(channelList->getSize()) {
|
if(channelList->getSize()) {
|
||||||
showInfo();
|
showInfo();
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
quickZap( msg );
|
quickZap( msg );
|
||||||
}
|
}
|
||||||
/* in case key_subchannel_up/down redefined */
|
/* in case key_subchannel_up/down redefined */
|
||||||
else if( msg == CRCInput::RC_left || msg == CRCInput::RC_right) {
|
else if( msg == CRCInput::RC_left || msg == CRCInput::RC_right) {
|
||||||
if(g_settings.mode_left_right_key_tv == SNeutrinoSettings::VOLUME) {
|
if(g_settings.mode_left_right_key_tv == SNeutrinoSettings::VOLUME) {
|
||||||
setVolume(msg, true);
|
g_volume->setVolume(msg, true);
|
||||||
} else if(channelList->getSize()) {
|
} else if(channelList->getSize()) {
|
||||||
showInfo();
|
showInfo();
|
||||||
}
|
}
|
||||||
@@ -2062,8 +2068,8 @@ void CNeutrinoApp::RealRun(CMenuWidget &mainMenu)
|
|||||||
else if( msg == (neutrino_msg_t) g_settings.key_zaphistory ) {
|
else if( msg == (neutrino_msg_t) g_settings.key_zaphistory ) {
|
||||||
// Zap-History "Bouquet"
|
// Zap-History "Bouquet"
|
||||||
if(g_settings.mode_clock && g_settings.key_zaphistory == CRCInput::RC_home) {
|
if(g_settings.mode_clock && g_settings.key_zaphistory == CRCInput::RC_home) {
|
||||||
InfoClock->StopClock();
|
|
||||||
g_settings.mode_clock=false;
|
g_settings.mode_clock=false;
|
||||||
|
InfoClock->StopClock();
|
||||||
} else {
|
} else {
|
||||||
StopSubtitles();
|
StopSubtitles();
|
||||||
int res = channelList->numericZap( msg );
|
int res = channelList->numericZap( msg );
|
||||||
@@ -2179,8 +2185,8 @@ void CNeutrinoApp::RealRun(CMenuWidget &mainMenu)
|
|||||||
else {
|
else {
|
||||||
if (msg == CRCInput::RC_home) {
|
if (msg == CRCInput::RC_home) {
|
||||||
if(g_settings.mode_clock && g_settings.key_zaphistory == CRCInput::RC_home) {
|
if(g_settings.mode_clock && g_settings.key_zaphistory == CRCInput::RC_home) {
|
||||||
InfoClock->StopClock();
|
|
||||||
g_settings.mode_clock=false;
|
g_settings.mode_clock=false;
|
||||||
|
InfoClock->StopClock();
|
||||||
}
|
}
|
||||||
CVFD::getInstance()->setMode(CVFD::MODE_TVRADIO);
|
CVFD::getInstance()->setMode(CVFD::MODE_TVRADIO);
|
||||||
}
|
}
|
||||||
@@ -2217,7 +2223,7 @@ int CNeutrinoApp::handleMsg(const neutrino_msg_t _msg, neutrino_msg_data_t data)
|
|||||||
g_Zapit->getVolume(&volume, &volume);
|
g_Zapit->getVolume(&volume, &volume);
|
||||||
current_volume = 100 - volume*100/63;
|
current_volume = 100 - volume*100/63;
|
||||||
printf("zapit volume %d new current %d mode %d\n", volume, current_volume, g_settings.audio_AnalogMode);
|
printf("zapit volume %d new current %d mode %d\n", volume, current_volume, g_settings.audio_AnalogMode);
|
||||||
setvol(current_volume);
|
g_volume->setvol(current_volume);
|
||||||
#endif
|
#endif
|
||||||
g_RCInput->killTimer(scrambled_timer);
|
g_RCInput->killTimer(scrambled_timer);
|
||||||
|
|
||||||
@@ -2307,6 +2313,9 @@ _show:
|
|||||||
nNewChannel = bouquetList->Bouquets[old_b]->channelList->exec();//with ZAP!
|
nNewChannel = bouquetList->Bouquets[old_b]->channelList->exec();//with ZAP!
|
||||||
else
|
else
|
||||||
nNewChannel = bouquetList->exec(true);
|
nNewChannel = bouquetList->exec(true);
|
||||||
|
// restore mute symbol
|
||||||
|
if (current_muted)
|
||||||
|
g_volume->AudioMute(current_muted, true);
|
||||||
} else if(msg == CRCInput::RC_sat) {
|
} else if(msg == CRCInput::RC_sat) {
|
||||||
SetChannelMode(LIST_MODE_SAT);
|
SetChannelMode(LIST_MODE_SAT);
|
||||||
nNewChannel = bouquetList->exec(true);
|
nNewChannel = bouquetList->exec(true);
|
||||||
@@ -2441,7 +2450,7 @@ _repeat:
|
|||||||
}
|
}
|
||||||
else if ((msg == CRCInput::RC_plus) || (msg == CRCInput::RC_minus))
|
else if ((msg == CRCInput::RC_plus) || (msg == CRCInput::RC_minus))
|
||||||
{
|
{
|
||||||
setVolume(msg, (mode != mode_scart));
|
g_volume->setVolume(msg, (mode != mode_scart));
|
||||||
return messages_return::handled;
|
return messages_return::handled;
|
||||||
}
|
}
|
||||||
else if( msg == CRCInput::RC_spkr ) {
|
else if( msg == CRCInput::RC_spkr ) {
|
||||||
@@ -2451,16 +2460,16 @@ _repeat:
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
//mute
|
//mute
|
||||||
AudioMute( !current_muted, true);
|
g_volume->AudioMute(!current_muted, true);
|
||||||
}
|
}
|
||||||
return messages_return::handled;
|
return messages_return::handled;
|
||||||
}
|
}
|
||||||
else if( msg == CRCInput::RC_mute_on ) {
|
else if( msg == CRCInput::RC_mute_on ) {
|
||||||
AudioMute( true, true);
|
g_volume->AudioMute(true, true);
|
||||||
return messages_return::handled;
|
return messages_return::handled;
|
||||||
}
|
}
|
||||||
else if( msg == CRCInput::RC_mute_off ) {
|
else if( msg == CRCInput::RC_mute_off ) {
|
||||||
AudioMute( false, true);
|
g_volume->AudioMute(false, true);
|
||||||
return messages_return::handled;
|
return messages_return::handled;
|
||||||
}
|
}
|
||||||
else if( msg == CRCInput::RC_analog_on ) {
|
else if( msg == CRCInput::RC_analog_on ) {
|
||||||
@@ -2513,7 +2522,7 @@ _repeat:
|
|||||||
#if 0
|
#if 0
|
||||||
CControldMsg::commandMute* cmd = (CControldMsg::commandMute*) data;
|
CControldMsg::commandMute* cmd = (CControldMsg::commandMute*) data;
|
||||||
if(cmd->type == (CControld::volume_type)g_settings.audio_avs_Control)
|
if(cmd->type == (CControld::volume_type)g_settings.audio_avs_Control)
|
||||||
AudioMute( cmd->mute, true );
|
g_volume->AudioMute(cmd->mute, true );
|
||||||
delete[] (unsigned char*) data;
|
delete[] (unsigned char*) data;
|
||||||
#endif
|
#endif
|
||||||
return messages_return::handled;
|
return messages_return::handled;
|
||||||
@@ -3083,182 +3092,6 @@ void CNeutrinoApp::saveEpg(bool cvfd_mode)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CNeutrinoApp::AudioMute( int newValue, bool isEvent )
|
|
||||||
{
|
|
||||||
if((g_settings.current_volume == 0) && (g_settings.show_mute_icon == 1))
|
|
||||||
return;
|
|
||||||
//printf("MUTE: val %d current %d event %d\n", newValue, current_muted, isEvent);
|
|
||||||
int dx = 0;
|
|
||||||
int dy = 0;
|
|
||||||
frameBuffer->getIconSize(NEUTRINO_ICON_BUTTON_MUTE,&dx,&dy);
|
|
||||||
int offset = (dx/4);
|
|
||||||
dx += offset;
|
|
||||||
dy += offset;
|
|
||||||
|
|
||||||
int x = g_settings.screen_EndX-dx;
|
|
||||||
int y = g_settings.screen_StartY;
|
|
||||||
|
|
||||||
printf("AudioMute: current %d new %d isEvent: %d\n", current_muted, newValue, isEvent);
|
|
||||||
CVFD::getInstance()->setMuted(newValue);
|
|
||||||
current_muted = newValue;
|
|
||||||
|
|
||||||
//if( !isEvent )
|
|
||||||
g_Zapit->muteAudio(current_muted);
|
|
||||||
|
|
||||||
if( isEvent && ( mode != mode_scart ) && ( mode != mode_audio) && ( mode != mode_pic))
|
|
||||||
{
|
|
||||||
if( current_muted ) {
|
|
||||||
frameBuffer->paintBoxRel(x, y, dx, dy, COL_INFOBAR_PLUS_0);
|
|
||||||
frameBuffer->paintIcon(NEUTRINO_ICON_BUTTON_MUTE, x+(offset/2), y+(offset/2));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
frameBuffer->paintBackgroundBoxRel(x, y, dx, dy);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void CNeutrinoApp::setvol(int vol)
|
|
||||||
{
|
|
||||||
audioDecoder->setVolume(vol, vol);
|
|
||||||
}
|
|
||||||
|
|
||||||
void CNeutrinoApp::setVolume(const neutrino_msg_t key, const bool bDoPaint, bool nowait)
|
|
||||||
{
|
|
||||||
neutrino_msg_t msg = key;
|
|
||||||
|
|
||||||
int dx = 0;//256
|
|
||||||
int dy = 0;//32
|
|
||||||
frameBuffer->getIconSize(NEUTRINO_ICON_VOLUME,&dx,&dy);
|
|
||||||
printf("CNeutrinoApp::setVolume dx %d dy %d\n", dx, dy);
|
|
||||||
dx *=16;
|
|
||||||
dy *=2;
|
|
||||||
#if 0 // orig
|
|
||||||
int x = (((g_settings.screen_EndX- g_settings.screen_StartX)- dx) / 2) + g_settings.screen_StartX;
|
|
||||||
int y = g_settings.screen_EndY - 100;
|
|
||||||
#else
|
|
||||||
|
|
||||||
int x = frameBuffer->getScreenX();
|
|
||||||
int y = frameBuffer->getScreenY();
|
|
||||||
#endif
|
|
||||||
int vol = g_settings.current_volume;
|
|
||||||
int sw = frameBuffer->getScreenWidth();
|
|
||||||
int sh = frameBuffer->getScreenHeight();
|
|
||||||
int clock_height = 0;
|
|
||||||
|
|
||||||
switch( g_settings.volume_pos )
|
|
||||||
{
|
|
||||||
case 0:// upper right
|
|
||||||
if(g_settings.mode_clock){
|
|
||||||
clock_height = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_CHANNAME]->getHeight();
|
|
||||||
}
|
|
||||||
x = sw - dx - 6;
|
|
||||||
y += clock_height;
|
|
||||||
break;
|
|
||||||
case 1:// upper left
|
|
||||||
break;
|
|
||||||
case 2:// bottom left
|
|
||||||
y = sh - dy;
|
|
||||||
break;
|
|
||||||
case 3:// bottom right
|
|
||||||
x = sw - dx;
|
|
||||||
y = sh - dy;
|
|
||||||
break;
|
|
||||||
case 4:// center default
|
|
||||||
x = ((sw - dx) / 2) + x;
|
|
||||||
break;
|
|
||||||
case 5:// center higher
|
|
||||||
x = ((sw - dx) / 2) + x;
|
|
||||||
y = sh - sh/15;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
fb_pixel_t * pixbuf = NULL;
|
|
||||||
|
|
||||||
if(bDoPaint) {
|
|
||||||
pixbuf = new fb_pixel_t[dx * dy];
|
|
||||||
if(pixbuf!= NULL)
|
|
||||||
frameBuffer->SaveScreen(x, y, dx, dy, pixbuf);
|
|
||||||
|
|
||||||
frameBuffer->paintBoxRel(x , y , dx, dy, COL_MENUCONTENT_PLUS_0, g_settings.rounded_corners ? dy/2 : 0);
|
|
||||||
frameBuffer->paintBoxRel(x+dy+dy/4-2, y+dy/4-2, dy*25/4+4, dy/2+4, COL_MENUCONTENT_PLUS_3);
|
|
||||||
frameBuffer->paintBoxRel(x+dy+dy/4, y+dy/4, dy*25/4, dy/2, COL_MENUCONTENT_PLUS_1);
|
|
||||||
frameBuffer->paintIcon(NEUTRINO_ICON_VOLUME,x+dy/2,y+(dy/4), 0, COL_MENUCONTENT_PLUS_0);
|
|
||||||
|
|
||||||
g_volscale->reset();
|
|
||||||
g_volscale->paintProgressBar2(x + dy+ (dy/4), y +(dy/4), g_settings.current_volume);
|
|
||||||
}
|
|
||||||
|
|
||||||
neutrino_msg_data_t data;
|
|
||||||
|
|
||||||
uint64_t timeoutEnd;
|
|
||||||
|
|
||||||
do {
|
|
||||||
if (msg <= CRCInput::RC_MaxRC)
|
|
||||||
{
|
|
||||||
int sub_chan_keybind = 0;
|
|
||||||
if (g_settings.mode_left_right_key_tv == SNeutrinoSettings::VOLUME && g_RemoteControl->subChannels.size() < 1)
|
|
||||||
sub_chan_keybind = 1;
|
|
||||||
|
|
||||||
if ((msg == CRCInput::RC_plus) || (sub_chan_keybind == 1 && (msg == CRCInput::RC_right))) {
|
|
||||||
if (g_settings.current_volume < 100 - g_settings.current_volume_step)
|
|
||||||
g_settings.current_volume += g_settings.current_volume_step;
|
|
||||||
else
|
|
||||||
g_settings.current_volume = 100;
|
|
||||||
|
|
||||||
if(current_muted)
|
|
||||||
AudioMute( false, true);
|
|
||||||
}
|
|
||||||
else if ((msg == CRCInput::RC_minus) || (sub_chan_keybind == 1 && (msg == CRCInput::RC_left))) {
|
|
||||||
if (g_settings.current_volume > g_settings.current_volume_step)
|
|
||||||
g_settings.current_volume -= g_settings.current_volume_step;
|
|
||||||
else if ((g_settings.show_mute_icon == 1) && (g_settings.current_volume = 1)) {
|
|
||||||
(g_settings.current_volume = 1);
|
|
||||||
AudioMute( true, true);
|
|
||||||
g_settings.current_volume = 0;
|
|
||||||
}
|
|
||||||
else if (g_settings.show_mute_icon == 0)
|
|
||||||
g_settings.current_volume = 0;
|
|
||||||
}
|
|
||||||
else if (msg == CRCInput::RC_home)
|
|
||||||
break;
|
|
||||||
else {
|
|
||||||
g_RCInput->postMsg(msg, data);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
setvol(g_settings.current_volume);
|
|
||||||
timeoutEnd = CRCInput::calcTimeoutEnd(nowait ? 1 : 3);
|
|
||||||
}
|
|
||||||
else if (msg == NeutrinoMessages::EVT_VOLCHANGED) {
|
|
||||||
//current_volume = g_Controld->getVolume((CControld::volume_type)g_settings.audio_avs_Control);//FIXME
|
|
||||||
//printf("setVolume EVT_VOLCHANGED %d\n", current_volume);
|
|
||||||
timeoutEnd = CRCInput::calcTimeoutEnd(3);
|
|
||||||
}
|
|
||||||
else if (handleMsg(msg, data) & messages_return::unhandled) {
|
|
||||||
g_RCInput->postMsg(msg, data);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (bDoPaint) {
|
|
||||||
if(vol != g_settings.current_volume) {
|
|
||||||
vol = g_settings.current_volume;
|
|
||||||
g_volscale->paintProgressBar2(x + dy+ (dy/4), y +(dy/4), g_settings.current_volume);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
CVFD::getInstance()->showVolume(g_settings.current_volume);
|
|
||||||
if (msg != CRCInput::RC_timeout) {
|
|
||||||
g_RCInput->getMsgAbsoluteTimeout(&msg, &data, &timeoutEnd, true );
|
|
||||||
}
|
|
||||||
} while (msg != CRCInput::RC_timeout);
|
|
||||||
|
|
||||||
//frameBuffer->paintBackgroundBoxRel(x, y, dx, dy); //FIXME osd bug
|
|
||||||
|
|
||||||
if( (bDoPaint) && (pixbuf!= NULL) ) {
|
|
||||||
frameBuffer->RestoreScreen(x, y, dx, dy, pixbuf);
|
|
||||||
delete [] pixbuf;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void CNeutrinoApp::tvMode( bool rezap )
|
void CNeutrinoApp::tvMode( bool rezap )
|
||||||
{
|
{
|
||||||
if(mode==mode_radio ) {
|
if(mode==mode_radio ) {
|
||||||
@@ -3274,6 +3107,8 @@ void CNeutrinoApp::tvMode( bool rezap )
|
|||||||
StartSubtitles(!rezap);
|
StartSubtitles(!rezap);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
g_volume->Init();
|
||||||
|
|
||||||
CVFD::getInstance()->setMode(CVFD::MODE_TVRADIO);
|
CVFD::getInstance()->setMode(CVFD::MODE_TVRADIO);
|
||||||
CVFD::getInstance()->ShowIcon(VFD_ICON_TV, true);
|
CVFD::getInstance()->ShowIcon(VFD_ICON_TV, true);
|
||||||
|
|
||||||
@@ -3464,7 +3299,7 @@ void CNeutrinoApp::standbyMode( bool bOnOff )
|
|||||||
if(g_settings.mode_clock)
|
if(g_settings.mode_clock)
|
||||||
InfoClock->StartClock();
|
InfoClock->StartClock();
|
||||||
|
|
||||||
AudioMute(current_muted, true);
|
g_volume->AudioMute(current_muted, true);
|
||||||
if((mode == mode_tv) && wasshift) {
|
if((mode == mode_tv) && wasshift) {
|
||||||
//startAutoRecord();
|
//startAutoRecord();
|
||||||
CRecordManager::getInstance()->StartAutoRecord();
|
CRecordManager::getInstance()->StartAutoRecord();
|
||||||
@@ -3528,11 +3363,11 @@ void CNeutrinoApp::switchTvRadioMode(const int prev_mode)
|
|||||||
void CNeutrinoApp::switchClockOnOff()
|
void CNeutrinoApp::switchClockOnOff()
|
||||||
{
|
{
|
||||||
if(g_settings.mode_clock) {
|
if(g_settings.mode_clock) {
|
||||||
InfoClock->StopClock();
|
|
||||||
g_settings.mode_clock=false;
|
g_settings.mode_clock=false;
|
||||||
|
InfoClock->StopClock();
|
||||||
} else {
|
} else {
|
||||||
InfoClock->StartClock();
|
|
||||||
g_settings.mode_clock=true;
|
g_settings.mode_clock=true;
|
||||||
|
InfoClock->StartClock();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -100,21 +100,6 @@ public:
|
|||||||
private:
|
private:
|
||||||
CFrameBuffer * frameBuffer;
|
CFrameBuffer * frameBuffer;
|
||||||
|
|
||||||
enum
|
|
||||||
{
|
|
||||||
mode_unknown = -1,
|
|
||||||
mode_tv = 1,
|
|
||||||
mode_radio = 2,
|
|
||||||
mode_scart = 3,
|
|
||||||
mode_standby = 4,
|
|
||||||
mode_audio = 5,
|
|
||||||
mode_pic = 6,
|
|
||||||
mode_ts = 7,
|
|
||||||
mode_off = 8,
|
|
||||||
mode_mask = 0xFF,
|
|
||||||
norezap = 0x100
|
|
||||||
};
|
|
||||||
|
|
||||||
CConfigFile configfile;
|
CConfigFile configfile;
|
||||||
CScanSettings scanSettings;
|
CScanSettings scanSettings;
|
||||||
CPersonalizeGui personalize;
|
CPersonalizeGui personalize;
|
||||||
@@ -154,8 +139,6 @@ private:
|
|||||||
void radioMode( bool rezap = true );
|
void radioMode( bool rezap = true );
|
||||||
void scartMode( bool bOnOff );
|
void scartMode( bool bOnOff );
|
||||||
void standbyMode( bool bOnOff );
|
void standbyMode( bool bOnOff );
|
||||||
void AudioMute( int newValue, bool isEvent= false );
|
|
||||||
void setvol(int vol);
|
|
||||||
void saveEpg(bool cvfd_mode);
|
void saveEpg(bool cvfd_mode);
|
||||||
|
|
||||||
void ExitRun(const bool write_si = true, int retcode = 0);
|
void ExitRun(const bool write_si = true, int retcode = 0);
|
||||||
@@ -173,6 +156,21 @@ private:
|
|||||||
CNeutrinoApp();
|
CNeutrinoApp();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
mode_unknown = -1,
|
||||||
|
mode_tv = 1,
|
||||||
|
mode_radio = 2,
|
||||||
|
mode_scart = 3,
|
||||||
|
mode_standby = 4,
|
||||||
|
mode_audio = 5,
|
||||||
|
mode_pic = 6,
|
||||||
|
mode_ts = 7,
|
||||||
|
mode_off = 8,
|
||||||
|
mode_mask = 0xFF,
|
||||||
|
norezap = 0x100
|
||||||
|
};
|
||||||
|
|
||||||
void saveSetup(const char * fname);
|
void saveSetup(const char * fname);
|
||||||
int loadSetup(const char * fname);
|
int loadSetup(const char * fname);
|
||||||
void loadKeys(const char * fname = NULL);
|
void loadKeys(const char * fname = NULL);
|
||||||
@@ -181,7 +179,6 @@ public:
|
|||||||
void SetupFonts();
|
void SetupFonts();
|
||||||
void setupRecordingDevice(void);
|
void setupRecordingDevice(void);
|
||||||
|
|
||||||
void setVolume(const neutrino_msg_t key, const bool bDoPaint = true, bool nowait = false);
|
|
||||||
~CNeutrinoApp();
|
~CNeutrinoApp();
|
||||||
CScanSettings& getScanSettings() {
|
CScanSettings& getScanSettings() {
|
||||||
return scanSettings;
|
return scanSettings;
|
||||||
@@ -213,9 +210,8 @@ public:
|
|||||||
void switchTvRadioMode(const int prev_mode = mode_unknown);
|
void switchTvRadioMode(const int prev_mode = mode_unknown);
|
||||||
void switchClockOnOff();
|
void switchClockOnOff();
|
||||||
|
|
||||||
bool isMuted() {
|
bool isMuted() {return current_muted; }
|
||||||
return current_muted;
|
void setCurrentMuted(int m) { current_muted = m; }
|
||||||
}
|
|
||||||
int recordingstatus;
|
int recordingstatus;
|
||||||
void SendSectionsdConfig(void);
|
void SendSectionsdConfig(void);
|
||||||
int GetChannelMode(void) {
|
int GetChannelMode(void) {
|
||||||
|
@@ -60,6 +60,8 @@
|
|||||||
#include <global.h>
|
#include <global.h>
|
||||||
#include <neutrino.h>
|
#include <neutrino.h>
|
||||||
#include <gui/widget/stringinput.h>
|
#include <gui/widget/stringinput.h>
|
||||||
|
#include <gui/infoclock.h>
|
||||||
|
#include <driver/volume.h>
|
||||||
|
|
||||||
// obsolete #include <gui/streaminfo.h>
|
// obsolete #include <gui/streaminfo.h>
|
||||||
|
|
||||||
@@ -403,6 +405,10 @@ bool CColorSetupNotifier::changeNotify(const neutrino_locale_t, void *)
|
|||||||
8, convertSetupAlpha2Alpha(g_settings.infobar_alpha) );
|
8, convertSetupAlpha2Alpha(g_settings.infobar_alpha) );
|
||||||
|
|
||||||
frameBuffer->paletteSet();
|
frameBuffer->paletteSet();
|
||||||
|
/* recalculate volumebar */
|
||||||
|
CVolume::getInstance()->Init();
|
||||||
|
/* recalculate infoclock */
|
||||||
|
CInfoClock::getInstance()->Init();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -496,7 +502,10 @@ bool CFontSizeNotifier::changeNotify(const neutrino_locale_t, void *)
|
|||||||
CNeutrinoApp::getInstance()->SetupFonts();
|
CNeutrinoApp::getInstance()->SetupFonts();
|
||||||
|
|
||||||
hintBox.hide();
|
hintBox.hide();
|
||||||
|
/* recalculate volumebar */
|
||||||
|
CVolume::getInstance()->Init();
|
||||||
|
/* recalculate infoclock */
|
||||||
|
CInfoClock::getInstance()->Init();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user