mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-28 07:51:11 +02:00
gui/filebrowser: don't crash when fonts are changed (untested)
Origin commit data
------------------
Branch: ni/coolstream
Commit: 805a1232cf
Author: martii <m4rtii@gmx.de>
Date: 2013-11-26 (Tue, 26 Nov 2013)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -274,9 +274,6 @@ CFileBrowser::CFileBrowser(const char * const _base, const tFileBrowserMode mode
|
||||
void CFileBrowser::commonInit()
|
||||
{
|
||||
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
|
||||
sc_init_dir = "/legacy/genrelist?k=" + g_settings.shoutcast_dev_id;
|
||||
|
||||
@@ -288,7 +285,15 @@ void CFileBrowser::commonInit()
|
||||
Hide_records = false;
|
||||
selected = 0;
|
||||
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();
|
||||
height = frameBuffer->getScreenHeightRel();
|
||||
x = getScreenStartX(width);
|
||||
@@ -307,7 +312,6 @@ void CFileBrowser::commonInit()
|
||||
height = theight + listmaxshow * fheight + 2 * foheight;
|
||||
y = getScreenStartY(height);
|
||||
|
||||
m_SMSKeyInput.setTimeout(SMSKEY_TIMEOUT);
|
||||
|
||||
}
|
||||
|
||||
@@ -760,6 +764,7 @@ bool CFileBrowser::exec(const char * const dirname)
|
||||
name = dirname;
|
||||
std::replace(name.begin(), name.end(), '\\', '/');
|
||||
|
||||
fontInit();
|
||||
paintHead();
|
||||
int selection = -1;
|
||||
if (name == Path)
|
||||
|
Reference in New Issue
Block a user