mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-31 17:31:20 +02:00
volumebar font reset after change (thx dboxoldie)
to avoid segfault Signed-off-by: Thilo Graf <dbt@novatux.de> picked from Duckbox-Developers/neutrino-mp-cst-next 4365761b2a47e12666154821c2ce982f74ef0627 needs supplements
This commit is contained in:
@@ -34,6 +34,7 @@
|
||||
#include <neutrino.h>
|
||||
#include <gui/infoclock.h>
|
||||
#include <driver/neutrinofonts.h>
|
||||
#include <system/debug.h>
|
||||
|
||||
using namespace std;
|
||||
|
||||
@@ -260,9 +261,23 @@ CVolumeHelper::CVolumeHelper()
|
||||
|
||||
frameBuffer = CFrameBuffer::getInstance();
|
||||
|
||||
CNeutrinoApp::getInstance()->OnAfterSetupFonts.connect(sigc::mem_fun(this, &CVolumeHelper::resetFont));
|
||||
|
||||
Init();
|
||||
}
|
||||
|
||||
void CVolumeHelper::resetFont()
|
||||
{
|
||||
if (vb_font){
|
||||
vb_font = NULL;
|
||||
dprintf(DEBUG_INFO, "\033[33m[CVolumeHelper][%s - %d] reset vb font \033[0m\n", __func__, __LINE__);
|
||||
}
|
||||
if (clock_font){
|
||||
clock_font = NULL;
|
||||
dprintf(DEBUG_INFO, "\033[33m[CVolumeHelper][%s - %d] reset clock font \033[0m\n", __func__, __LINE__);
|
||||
}
|
||||
}
|
||||
|
||||
void CVolumeHelper::Init(Font* font)
|
||||
{
|
||||
|
||||
|
@@ -108,6 +108,7 @@ class CVolumeHelper
|
||||
Font* clock_font;
|
||||
CFrameBuffer *frameBuffer;
|
||||
|
||||
void resetFont();
|
||||
void Init(Font* font=NULL);
|
||||
void initVolBarSize();
|
||||
void initMuteIcon();
|
||||
|
Reference in New Issue
Block a user