mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-09-01 18:01:13 +02:00
Merge branch 'dvbsi++' of coolstreamtech.de:cst-public-gui-neutrino into valgrind
This commit is contained in:
@@ -30,13 +30,6 @@
|
|||||||
#include <driver/fontrenderer.h>
|
#include <driver/fontrenderer.h>
|
||||||
#include <driver/framebuffer.h>
|
#include <driver/framebuffer.h>
|
||||||
|
|
||||||
class CPrivateData
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
CFrameBuffer * frameBuffer;
|
|
||||||
fb_pixel_t * Background;
|
|
||||||
};
|
|
||||||
|
|
||||||
CFBWindow::CFBWindow(const int _x, const int _y, const int _dx, const int _dy)
|
CFBWindow::CFBWindow(const int _x, const int _y, const int _dx, const int _dy)
|
||||||
{
|
{
|
||||||
x = _x ;
|
x = _x ;
|
||||||
@@ -44,35 +37,28 @@ CFBWindow::CFBWindow(const int _x, const int _y, const int _dx, const int _dy)
|
|||||||
dx = _dx;
|
dx = _dx;
|
||||||
dy = _dy;
|
dy = _dy;
|
||||||
|
|
||||||
private_data = (void *) new CPrivateData;
|
frameBuffer = CFrameBuffer::getInstance();
|
||||||
((CPrivateData *)private_data)->frameBuffer = CFrameBuffer::getInstance();
|
Background = new fb_pixel_t [_dx * _dy];
|
||||||
((CPrivateData *)private_data)->Background = new fb_pixel_t [_dx * _dy];
|
if (Background != NULL)
|
||||||
if (((CPrivateData *)private_data)->Background != NULL)
|
frameBuffer->SaveScreen(_x, _y, _dx, _dy, Background);
|
||||||
((CPrivateData *)private_data)->frameBuffer->SaveScreen(_x, _y, _dx, _dy, (fb_pixel_t *)((CPrivateData *)private_data)->Background);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CFBWindow::~CFBWindow(void)
|
CFBWindow::~CFBWindow(void)
|
||||||
{
|
{
|
||||||
if (private_data != NULL)
|
if (Background != NULL)
|
||||||
{
|
frameBuffer->RestoreScreen(x, y, dx, dy, Background);
|
||||||
if (((CPrivateData *)private_data)->Background != NULL)
|
delete[] Background;
|
||||||
((CPrivateData *)private_data)->frameBuffer->RestoreScreen(x, y, dx, dy, (fb_pixel_t *)((CPrivateData *)private_data)->Background);
|
|
||||||
|
|
||||||
delete ((CPrivateData *)private_data)->Background;
|
|
||||||
delete ((CPrivateData *)private_data);
|
|
||||||
private_data = NULL;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CFBWindow::paintBoxRel(const int _x, const int _y, const int _dx, const int _dy, const color_t _col, int radius, int type)
|
void CFBWindow::paintBoxRel(const int _x, const int _y, const int _dx, const int _dy, const color_t _col, int radius, int type)
|
||||||
{
|
{
|
||||||
((CPrivateData *)private_data)->frameBuffer->paintBoxRel(x + _x, y + _y, _dx, _dy, _col, radius, type);
|
frameBuffer->paintBoxRel(x + _x, y + _y, _dx, _dy, _col, radius, type);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CFBWindow::paintIcon(const char * const _filename, const int _x, const int _y, const int _h, const color_t _offset)
|
bool CFBWindow::paintIcon(const char * const _filename, const int _x, const int _y, const int _h, const color_t _offset)
|
||||||
{
|
{
|
||||||
((CPrivateData *)private_data)->frameBuffer->paintIcon(_filename, x + _x, y + _y, _h, _offset);
|
frameBuffer->paintIcon(_filename, x + _x, y + _y, _h, _offset);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,8 +1,4 @@
|
|||||||
#ifndef __fb_window_h__
|
|
||||||
#define __fb_window_h__
|
|
||||||
/*
|
/*
|
||||||
* $Header: /cvs/tuxbox/apps/tuxbox/neutrino/src/driver/fb_window.h,v 1.3 2004/03/13 12:45:41 thegoodguy Exp $
|
|
||||||
*
|
|
||||||
* abstract fb_window class - d-box2 linux project
|
* abstract fb_window class - d-box2 linux project
|
||||||
*
|
*
|
||||||
* (C) 2003 by thegoodguy <thegoodguy@berlios.de>
|
* (C) 2003 by thegoodguy <thegoodguy@berlios.de>
|
||||||
@@ -23,15 +19,21 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifndef __fb_window_h__
|
||||||
|
#define __fb_window_h__
|
||||||
|
|
||||||
|
#include <driver/fontrenderer.h>
|
||||||
|
#include <driver/framebuffer.h>
|
||||||
|
|
||||||
class CFBWindow
|
class CFBWindow
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef unsigned int color_t;
|
typedef unsigned int color_t;
|
||||||
typedef void * font_t;
|
typedef void * font_t;
|
||||||
typedef void * private_data_t;
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
private_data_t private_data;
|
CFrameBuffer * frameBuffer;
|
||||||
|
fb_pixel_t * Background;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
int x, y; /* upper left corner */
|
int x, y; /* upper left corner */
|
||||||
|
@@ -105,7 +105,7 @@ void CVolume::Init()
|
|||||||
progress_h = std::max(icon_h, digit_h) - 2*pB;
|
progress_h = std::max(icon_h, digit_h) - 2*pB;
|
||||||
vbar_w += digit_w;
|
vbar_w += digit_w;
|
||||||
}
|
}
|
||||||
|
delete g_volscale;
|
||||||
g_volscale = new CProgressBar(true, progress_w, progress_h, 50, 100, 80, true);
|
g_volscale = new CProgressBar(true, progress_w, progress_h, 50, 100, 80, true);
|
||||||
|
|
||||||
// mute icon
|
// mute icon
|
||||||
|
@@ -121,8 +121,8 @@ private:
|
|||||||
bool pbBlinkChange;
|
bool pbBlinkChange;
|
||||||
CColorSetupNotifier *colorSetupNotifier;
|
CColorSetupNotifier *colorSetupNotifier;
|
||||||
CMoviePluginChangeExec *MoviePluginChanger;
|
CMoviePluginChangeExec *MoviePluginChanger;
|
||||||
COnekeyPluginChangeExec *OnekeyPluginChanger;
|
//COnekeyPluginChangeExec *OnekeyPluginChanger;
|
||||||
CIPChangeNotifier *MyIPChanger;
|
//CIPChangeNotifier *MyIPChanger;
|
||||||
|
|
||||||
void SDT_ReloadChannels();
|
void SDT_ReloadChannels();
|
||||||
void setupNetwork( bool force= false );
|
void setupNetwork( bool force= false );
|
||||||
|
@@ -99,10 +99,16 @@ CLocaleManager::CLocaleManager()
|
|||||||
CLocaleManager::~CLocaleManager()
|
CLocaleManager::~CLocaleManager()
|
||||||
{
|
{
|
||||||
for (unsigned j = 0; j < (sizeof(locale_real_names)/sizeof(const char *)); j++)
|
for (unsigned j = 0; j < (sizeof(locale_real_names)/sizeof(const char *)); j++)
|
||||||
if (localeData[j] != locale_real_names[j])
|
if (localeData[j] != locale_real_names[j] && localeData[j] != defaultData[j])
|
||||||
::free(localeData[j]);
|
::free(localeData[j]);
|
||||||
|
|
||||||
delete localeData;
|
delete[] localeData;
|
||||||
|
|
||||||
|
for (unsigned j = 0; j < (sizeof(locale_real_names)/sizeof(const char *)); j++)
|
||||||
|
if (defaultData[j] != locale_real_names[j])
|
||||||
|
::free(defaultData[j]);
|
||||||
|
|
||||||
|
delete[] defaultData;
|
||||||
}
|
}
|
||||||
|
|
||||||
const char * path[2] = {"/var/tuxbox/config/locale/", DATADIR "/neutrino/locale/"};
|
const char * path[2] = {"/var/tuxbox/config/locale/", DATADIR "/neutrino/locale/"};
|
||||||
|
Reference in New Issue
Block a user