- new options for logo display in infobar + better locales

git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@1465 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
striper
2011-05-12 18:35:29 +00:00
parent 6048e5e396
commit 49163a31f7
6 changed files with 36 additions and 17 deletions

View File

@@ -753,9 +753,11 @@ miscsettings.infobar_casystem_mini Mini
miscsettings.infobar_casystem_mode Diskret
miscsettings.infobar_disp_0 Kein Logo
miscsettings.infobar_disp_1 Logo in der Nummernbox
miscsettings.infobar_disp_2 Logo Infobar / Kanalnummer
miscsettings.infobar_disp_3 Logo Infobar / Signalbalken
miscsettings.infobar_disp_log Infobar Dis.
miscsettings.infobar_disp_2 Logo/Kanalnummer
miscsettings.infobar_disp_3 Logo+Kanalname/Signalbalken
miscsettings.infobar_disp_4 Logo+Kanalname/Kanalnummer
miscsettings.infobar_disp_5 Logo/Signalbalken
miscsettings.infobar_disp_log Logo
miscsettings.infobar_sat_display Kabel-/Satellitenanbieter
miscsettings.infobar_show Info bei EPG Änderungen
miscsettings.infobar_show_res Auflösung anzeigen

View File

@@ -755,7 +755,9 @@ miscsettings.infobar_disp_0 without Logo
miscsettings.infobar_disp_1 Logo 1
miscsettings.infobar_disp_2 Logo 2
miscsettings.infobar_disp_3 Logo 3
miscsettings.infobar_disp_log Infoview Dis.
miscsettings.infobar_disp_4 Logo 4
miscsettings.infobar_disp_5 Logo 5
miscsettings.infobar_disp_log Logo
miscsettings.infobar_sat_display Satellite display on infobar
miscsettings.infobar_show show Info on EPG change
miscsettings.infobar_show_res show resolution on infobar

View File

@@ -187,7 +187,7 @@ void CInfoViewer::start ()
25;
InfoHeightY_Info = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getHeight()+ 5;
if ( g_settings.infobar_show_channellogo != 3) /* 3 is "old default" with sigscales etc. */
if ( g_settings.infobar_show_channellogo != 3 || g_settings.infobar_show_channellogo != 5 ) /* 3 & 5 is "default" with sigscales etc. */
{
ChanWidth = 4 * g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_NUMBER]->getRenderWidth(widest_number) + 10;
ChanHeight = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_NUMBER]->getHeight() * 9 / 8;
@@ -714,11 +714,14 @@ void CInfoViewer::showTitle (const int ChanNum, const std::string & Channel, con
}
}
if (ChannelLogoMode != 2)
if (g_settings.infobar_show_channellogo != 5) {
if (ChannelLogoMode != 2) {
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_CHANNAME]->RenderString(
ChanNameX + 10 + ChanNumWidth, ChanNameY + time_height,
BoxEndX - (ChanNameX + 20) - time_width - LEFT_OFFSET - 5 - ChanNumWidth,
ChannelName, COL_INFOBAR, 0, true); // UTF-8
}
}
if (fileplay) {
show_Data ();
@@ -1289,7 +1292,7 @@ void CInfoViewer::showSNR ()
/* right now, infobar_show_channellogo == 3 is the trigger for signal bars etc.
TODO: decouple this */
if (! fileplay && g_settings.infobar_show_channellogo == 3) {
if ((! fileplay && g_settings.infobar_show_channellogo == 3) || (! fileplay && g_settings.infobar_show_channellogo == 5)) {
int chanH = g_SignalFont->getHeight();
int freqStartY = BoxStartY + 2 * chanH - 3;
if (newfreq && chanready) {
@@ -1824,7 +1827,7 @@ int CInfoViewer::showChannelLogo(const t_channel_id logo_channel_id)
logo_y = y_mid - logo_h / 2;
res = 1;
}
else if (g_settings.infobar_show_channellogo == 2) // paint logo in place of channel name
else if (g_settings.infobar_show_channellogo == 2 || g_settings.infobar_show_channellogo == 5) // paint logo in place of channel name
{
// check logo dimensions
resize_logo(&logo_w, &logo_h, chan_w, time_height);
@@ -1834,9 +1837,12 @@ int CInfoViewer::showChannelLogo(const t_channel_id logo_channel_id)
y_mid = ChanNameY + time_height / 2;
logo_x = start_x + 10;
logo_y = y_mid - logo_h / 2;
if (g_settings.infobar_show_channellogo == 2)
res = 2;
else
res = 5;
}
else if (g_settings.infobar_show_channellogo == 3) // paint logo beside channel name
else if (g_settings.infobar_show_channellogo == 3 || g_settings.infobar_show_channellogo == 4) // paint logo beside channel name
{
// check logo dimensions
int Logo_max_width = chan_w - logo_w - 10;
@@ -1847,7 +1853,10 @@ int CInfoViewer::showChannelLogo(const t_channel_id logo_channel_id)
logo_y = y_mid - logo_h / 2;
// set channel name x pos right of the logo
ChanNameX = start_x + logo_w + 10;
if (g_settings.infobar_show_channellogo == 3)
res = 3;
else
res = 4;
}
else
{

View File

@@ -542,13 +542,15 @@ void COsdSetup::showOsdTimeoutSetup(CMenuWidget* menu_timeout)
menu_timeout->addItem(new CMenuForwarder(LOCALE_OPTIONS_DEFAULT, true, NULL, this, "osd.def", CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED));
}
#define LOCALE_MISCSETTINGS_INFOBAR_DISP_OPTIONS_COUNT 4
#define LOCALE_MISCSETTINGS_INFOBAR_DISP_OPTIONS_COUNT 6
const CMenuOptionChooser::keyval LOCALE_MISCSETTINGS_INFOBAR_DISP_OPTIONS[LOCALE_MISCSETTINGS_INFOBAR_DISP_OPTIONS_COUNT]=
{
{ 0 , LOCALE_MISCSETTINGS_INFOBAR_DISP_0 },
{ 1 , LOCALE_MISCSETTINGS_INFOBAR_DISP_1 },
{ 2 , LOCALE_MISCSETTINGS_INFOBAR_DISP_2 },
{ 3 , LOCALE_MISCSETTINGS_INFOBAR_DISP_3 }
{ 3 , LOCALE_MISCSETTINGS_INFOBAR_DISP_3 },
{ 4 , LOCALE_MISCSETTINGS_INFOBAR_DISP_4 },
{ 5 , LOCALE_MISCSETTINGS_INFOBAR_DISP_5 }
};
//infobar

View File

@@ -782,6 +782,8 @@ typedef enum
LOCALE_MISCSETTINGS_INFOBAR_DISP_1,
LOCALE_MISCSETTINGS_INFOBAR_DISP_2,
LOCALE_MISCSETTINGS_INFOBAR_DISP_3,
LOCALE_MISCSETTINGS_INFOBAR_DISP_4,
LOCALE_MISCSETTINGS_INFOBAR_DISP_5,
LOCALE_MISCSETTINGS_INFOBAR_DISP_LOG,
LOCALE_MISCSETTINGS_INFOBAR_SAT_DISPLAY,
LOCALE_MISCSETTINGS_INFOBAR_SHOW,

View File

@@ -782,6 +782,8 @@ const char * locale_real_names[] =
"miscsettings.infobar_disp_1",
"miscsettings.infobar_disp_2",
"miscsettings.infobar_disp_3",
"miscsettings.infobar_disp_4",
"miscsettings.infobar_disp_5",
"miscsettings.infobar_disp_log",
"miscsettings.infobar_sat_display",
"miscsettings.infobar_show",