mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-29 08:21:07 +02:00
gui/filebrowser: don't crash when fonts are changed (untested)
Origin commit data
------------------
Commit: 805a1232cf
Author: martii <m4rtii@gmx.de>
Date: 2013-11-26 (Tue, 26 Nov 2013)
This commit is contained in:
@@ -274,9 +274,6 @@ CFileBrowser::CFileBrowser(const char * const _base, const tFileBrowserMode mode
|
|||||||
void CFileBrowser::commonInit()
|
void CFileBrowser::commonInit()
|
||||||
{
|
{
|
||||||
frameBuffer = CFrameBuffer::getInstance();
|
frameBuffer = CFrameBuffer::getInstance();
|
||||||
fnt_title = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE];
|
|
||||||
fnt_item = g_Font[SNeutrinoSettings::FONT_TYPE_FILEBROWSER_ITEM];
|
|
||||||
fnt_small = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL];
|
|
||||||
//shoutcast
|
//shoutcast
|
||||||
sc_init_dir = "/legacy/genrelist?k=" + g_settings.shoutcast_dev_id;
|
sc_init_dir = "/legacy/genrelist?k=" + g_settings.shoutcast_dev_id;
|
||||||
|
|
||||||
@@ -288,7 +285,15 @@ void CFileBrowser::commonInit()
|
|||||||
Hide_records = false;
|
Hide_records = false;
|
||||||
selected = 0;
|
selected = 0;
|
||||||
selections.clear();
|
selections.clear();
|
||||||
|
m_SMSKeyInput.setTimeout(SMSKEY_TIMEOUT);
|
||||||
|
fontInit();
|
||||||
|
}
|
||||||
|
|
||||||
|
void CFileBrowser::fontInit()
|
||||||
|
{
|
||||||
|
fnt_title = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE];
|
||||||
|
fnt_item = g_Font[SNeutrinoSettings::FONT_TYPE_FILEBROWSER_ITEM];
|
||||||
|
fnt_small = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL];
|
||||||
width = frameBuffer->getScreenWidthRel();
|
width = frameBuffer->getScreenWidthRel();
|
||||||
height = frameBuffer->getScreenHeightRel();
|
height = frameBuffer->getScreenHeightRel();
|
||||||
x = getScreenStartX(width);
|
x = getScreenStartX(width);
|
||||||
@@ -307,7 +312,6 @@ void CFileBrowser::commonInit()
|
|||||||
height = theight + listmaxshow * fheight + 2 * foheight;
|
height = theight + listmaxshow * fheight + 2 * foheight;
|
||||||
y = getScreenStartY(height);
|
y = getScreenStartY(height);
|
||||||
|
|
||||||
m_SMSKeyInput.setTimeout(SMSKEY_TIMEOUT);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -760,6 +764,7 @@ bool CFileBrowser::exec(const char * const dirname)
|
|||||||
name = dirname;
|
name = dirname;
|
||||||
std::replace(name.begin(), name.end(), '\\', '/');
|
std::replace(name.begin(), name.end(), '\\', '/');
|
||||||
|
|
||||||
|
fontInit();
|
||||||
paintHead();
|
paintHead();
|
||||||
int selection = -1;
|
int selection = -1;
|
||||||
if (name == Path)
|
if (name == Path)
|
||||||
|
@@ -194,6 +194,7 @@ class CFileBrowser
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
void commonInit();
|
void commonInit();
|
||||||
|
void fontInit();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CFileList filelist;
|
CFileList filelist;
|
||||||
|
Reference in New Issue
Block a user