COsdSetup: Display file names in font setup menu

Origin commit data
------------------
Branch: ni/coolstream
Commit: 6d3a05fe0a
Author: Michael Liebmann <tuxcode.bbg@gmail.com>
Date: 2013-07-03 (Wed, 03 Jul 2013)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
Michael Liebmann
2013-07-03 04:54:18 +02:00
parent 9e36a9e529
commit be561abd35
2 changed files with 20 additions and 8 deletions

View File

@@ -55,6 +55,7 @@
#include <zapit/femanager.h>
#include <system/debug.h>
#include <system/helpers.h>
extern CRemoteControl * g_RemoteControl;
@@ -81,6 +82,8 @@ COsdSetup::~COsdSetup()
{
delete colorSetupNotifier;
delete fontsizenotifier;
delete mfFontFile;
delete mfTtxFontFile;
}
//font settings
@@ -195,6 +198,8 @@ int COsdSetup::exec(CMenuTarget* parent, const std::string &actionKey)
strcpy(g_settings.font_file, fileBrowser.getSelectedFile()->Name.c_str());
printf("[neutrino] new font file %s\n", fileBrowser.getSelectedFile()->Name.c_str());
CNeutrinoApp::getInstance()->SetupFonts();
osdFontFile = "(" + getBaseName(fileBrowser.getSelectedFile()->Name) + ")";
mfFontFile->setOption(osdFontFile.c_str());
}
return menu_return::RETURN_REPAINT;
}
@@ -210,6 +215,8 @@ int COsdSetup::exec(CMenuTarget* parent, const std::string &actionKey)
ttx_font_file = fileBrowser.getSelectedFile()->Name;
printf("[neutrino] ttx font file %s\n", fileBrowser.getSelectedFile()->Name.c_str());
CNeutrinoApp::getInstance()->SetupFonts();
osdTtxFontFile = "(" + getBaseName(fileBrowser.getSelectedFile()->Name) + ")";
mfTtxFontFile->setOption(osdTtxFontFile.c_str());
}
return menu_return::RETURN_REPAINT;
}
@@ -416,7 +423,7 @@ int COsdSetup::showOsdSetup()
osd_menu->addItem(mf);
//fonts
CMenuWidget osd_menu_fonts(LOCALE_MAINMENU_SETTINGS, NEUTRINO_ICON_COLORS, width, MN_WIDGET_ID_OSDSETUP_FONT);
CMenuWidget osd_menu_fonts(LOCALE_MAINMENU_SETTINGS, NEUTRINO_ICON_COLORS, w_max(50, 10), MN_WIDGET_ID_OSDSETUP_FONT);
showOsdFontSizeSetup(&osd_menu_fonts);
mf = new CMenuForwarder(LOCALE_FONTMENU_HEAD, true, NULL, &osd_menu_fonts, NULL, CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN);
mf->setHint("", LOCALE_MENU_HINT_FONTS);
@@ -653,7 +660,6 @@ void COsdSetup::AddFontSettingItem(CMenuWidget &font_Settings, const SNeutrinoSe
font_Settings.addItem(new CMenuNumberInput(neutrino_font[number_of_fontsize_entry].name, neutrino_font[number_of_fontsize_entry].defaultsize, fontsizenotifier, CNeutrinoApp::getInstance()->getConfigFile()));
}
//font settings menu
void COsdSetup::showOsdFontSizeSetup(CMenuWidget *menu_fonts)
{
@@ -663,14 +669,18 @@ void COsdSetup::showOsdFontSizeSetup(CMenuWidget *menu_fonts)
fontSettings->addIntroItems(LOCALE_FONTMENU_HEAD);
// select gui font file
mf = new CMenuForwarder(LOCALE_COLORMENU_FONT, true, NULL, this, "select_font", CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED);
mf->setHint("", LOCALE_MENU_HINT_FONT_GUI);
fontSettings->addItem(mf);
osdFontFile = g_settings.font_file;
osdFontFile = "(" + getBaseName(osdFontFile) + ")";
mfFontFile = new CMenuForwarder(LOCALE_COLORMENU_FONT, true, osdFontFile.c_str(), this, "select_font", CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED);
mfFontFile->setHint("", LOCALE_MENU_HINT_FONT_GUI);
fontSettings->addItem(mfFontFile);
// select teletext font file
mf = new CMenuForwarder(LOCALE_COLORMENU_FONT_TTX, true, NULL, this, "ttx_font", CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN);
mf->setHint("", LOCALE_MENU_HINT_FONT_TTX);
fontSettings->addItem(mf);
osdTtxFontFile = g_settings.ttx_font_file;
osdTtxFontFile = "(" + getBaseName(osdTtxFontFile) + ")";
mfTtxFontFile = new CMenuForwarder(LOCALE_COLORMENU_FONT_TTX, true, osdTtxFontFile.c_str(), this, "ttx_font", CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN);
mfTtxFontFile->setHint("", LOCALE_MENU_HINT_FONT_TTX);
fontSettings->addItem(mfTtxFontFile);
// contrast fonts
CMenuOptionChooser * mc = new CMenuOptionChooser(LOCALE_COLORMENU_CONTRAST_FONTS, &g_settings.contrast_fonts, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, this, CRCInput::RC_yellow, NEUTRINO_ICON_BUTTON_YELLOW);