[Commits] : Tuxbox-GIT: apps branch master updated. CVS-Final-580-gdf4282c
Tuxbox Sources
Brought to you by:
dbt1
|
From: GetAway <tux...@ne...> - 2015-05-28 16:41:42
|
Project "Tuxbox-GIT: apps":
The branch, master has been updated
via df4282c81b2e990852dd4de4ac83e1bca392184f (commit)
via 99d3ea53f05c1c2ef734fadaeb98caaa0d8fd9b7 (commit)
from a723bc73dd2c37ee24e0537e23c6c7b61f0a8dcc (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit df4282c81b2e990852dd4de4ac83e1bca392184f
Author: GetAway <get...@t-...>
Date: Thu May 28 18:40:56 2015 +0200
convert var font_file to std::string
Signed-off-by: GetAway <get...@t-...>
diff --git a/tuxbox/neutrino/src/gui/osd_setup.cpp b/tuxbox/neutrino/src/gui/osd_setup.cpp
index efe5f43..e70fdb5 100644
--- a/tuxbox/neutrino/src/gui/osd_setup.cpp
+++ b/tuxbox/neutrino/src/gui/osd_setup.cpp
@@ -186,8 +186,8 @@ int COsdSetup::exec(CMenuTarget* parent, const std::string &actionKey)
fileBrowser.Filter = &fileFilter;
if (fileBrowser.exec(font_Dir.c_str()))
{
- strcpy(g_settings.font_file, fileBrowser.getSelectedFile()->Name.c_str());
- printf("[neutrino] new font file %s\n", fileBrowser.getSelectedFile()->Name.c_str());
+ g_settings.font_file = fileBrowser.getSelectedFile()->Name;
+ printf("[neutrino] new font file %s\n", g_settings.font_file.c_str());
CNeutrinoApp::getInstance()->SetupFonts();
font_file_name = fileBrowser.getSelectedFile()->getFileName();
}
diff --git a/tuxbox/neutrino/src/neutrino.cpp b/tuxbox/neutrino/src/neutrino.cpp
index 31a7707..c3b64b5 100644
--- a/tuxbox/neutrino/src/neutrino.cpp
+++ b/tuxbox/neutrino/src/neutrino.cpp
@@ -668,7 +668,7 @@ int CNeutrinoApp::loadSetup()
strcpy(g_settings.softupdate_proxypassword, configfile.getString("softupdate_proxypassword", "" ).c_str());
#endif
// GUI font
- strcpy(g_settings.font_file, configfile.getString( "font_file", FONTDIR"/LiberationSans-Regular.ttf" ).c_str());
+ g_settings.font_file = configfile.getString( "font_file", FONTDIR"/LiberationSans-Regular.ttf" );
//BouquetHandling
g_settings.bouquetlist_mode = configfile.getInt32( "bouquetlist_mode", bsmChannels );
@@ -1611,9 +1611,9 @@ bool CNeutrinoApp::ChangeFonts(int unicode_locale)
{
loadLocale_ret = unicode_locale;
if (unicode_locale == CLocaleManager::UNICODE_FONT &&
- strcmp(g_settings.font_file, FONTDIR"/LiberationSans-Regular.ttf") != 0)
+ g_settings.font_file == FONTDIR"/LiberationSans-Regular.ttf")
{
- strcpy(g_settings.font_file, FONTDIR"/LiberationSans-Regular.ttf");
+ g_settings.font_file = FONTDIR"/LiberationSans-Regular.ttf";
SetupFonts();
}
if (lcd_font.filename[0] == NULL)
@@ -1636,12 +1636,12 @@ void CNeutrinoApp::SetupFonts()
if(font.filename != NULL)
free((void *)font.filename);
- printf("[neutrino] settings font file %s\n", g_settings.font_file);
+ printf("[neutrino] settings font file %s\n", g_settings.font_file.c_str());
- if(access(g_settings.font_file, F_OK)) {
+ if(access(g_settings.font_file.c_str(), F_OK)) {
if(!access(FONTDIR"/LiberationSans-Regular.ttf", F_OK)){
font.filename = strdup(FONTDIR"/LiberationSans-Regular.ttf");
- strcpy(g_settings.font_file, font.filename);
+ g_settings.font_file = font.filename;
}
else{
fprintf( stderr,"[neutrino] font file [%s] not found\n neutrino exit\n",FONTDIR"/LiberationSans-Regular.ttf");
@@ -1650,7 +1650,7 @@ void CNeutrinoApp::SetupFonts()
}
else{
- font.filename = strdup(g_settings.font_file);
+ font.filename = strdup(g_settings.font_file.c_str());
}
style[FONT_STYLE_REGULAR] = g_fontRenderer->AddFont(font.filename);
@@ -2050,7 +2050,7 @@ int CNeutrinoApp::run(int argc, char **argv)
unsigned int use_true_unicode_font = (loadLocale_ret == CLocaleManager::ISO_8859_1_FONT) ? 0 : 1;
if (use_true_unicode_font)
- strcpy(g_settings.font_file, FONTDIR"/LiberationSans-Regular.ttf");
+ g_settings.font_file = FONTDIR"/LiberationSans-Regular.ttf";
if (lcd_font.filename[0] == NULL) /* no lcd font specified in command line */
{
CLCD::getInstance()->init(predefined_lcd_font[use_true_unicode_font].filename[0],
diff --git a/tuxbox/neutrino/src/system/settings.h b/tuxbox/neutrino/src/system/settings.h
index a8e37b9..d45cffd 100644
--- a/tuxbox/neutrino/src/system/settings.h
+++ b/tuxbox/neutrino/src/system/settings.h
@@ -477,7 +477,7 @@ struct {
int uboot_lcd_bias;
//osd
- char font_file[100];
+ std::string font_file;
// USERMENU
typedef enum
commit 99d3ea53f05c1c2ef734fadaeb98caaa0d8fd9b7
Author: [CST] Focus <foc...@gm...>
Date: Thu May 28 18:39:31 2015 +0200
Add Latin1_to_UTF8 for std::string
Signed-off-by: GetAway <get...@t-...>
diff --git a/dvb/zapit/include/zapit/client/zapittools.h b/dvb/zapit/include/zapit/client/zapittools.h
index c5ee188..5ffc55f 100644
--- a/dvb/zapit/include/zapit/client/zapittools.h
+++ b/dvb/zapit/include/zapit/client/zapittools.h
@@ -32,6 +32,7 @@ namespace ZapitTools
std::string UTF8_to_Latin1 (const std::string &s);
std::string UTF8_to_UTF8XML(const char *);
std::string Latin1_to_UTF8 (const char *);
+ std::string Latin1_to_UTF8 (const std::string &s);
}
#endif
diff --git a/dvb/zapit/lib/zapittools.cpp b/dvb/zapit/lib/zapittools.cpp
index 5ef5de5..e69d1ff 100644
--- a/dvb/zapit/lib/zapittools.cpp
+++ b/dvb/zapit/lib/zapittools.cpp
@@ -65,6 +65,10 @@ namespace ZapitTools {
}
return r;
}
+ std::string UTF8_to_Latin1(const std::string &s)
+ {
+ return UTF8_to_Latin1(s.c_str());
+ }
std::string UTF8_to_UTF8XML(const char * s)
{
@@ -124,9 +128,9 @@ namespace ZapitTools {
}
return r;
}
- std::string UTF8_to_Latin1(const std::string &s)
+ std::string Latin1_to_UTF8(const std::string & s)
{
- return UTF8_to_Latin1(s.c_str());
+ return Latin1_to_UTF8(s.c_str());
}
}
-----------------------------------------------------------------------
Summary of changes:
dvb/zapit/include/zapit/client/zapittools.h | 1 +
dvb/zapit/lib/zapittools.cpp | 8 ++++++--
tuxbox/neutrino/src/gui/osd_setup.cpp | 4 ++--
tuxbox/neutrino/src/neutrino.cpp | 16 ++++++++--------
tuxbox/neutrino/src/system/settings.h | 2 +-
5 files changed, 18 insertions(+), 13 deletions(-)
--
Tuxbox-GIT: apps
|