mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-30 00:41:09 +02:00
add Logo+Kanalnummer/Signalbalken option
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@1494 e54a6e83-5905-42d5-8d5c-058d10e6a962
Origin commit data
------------------
Branch: ni/coolstream
Commit: e73cf4aa52
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2011-05-26 (Thu, 26 May 2011)
Origin message was:
------------------
-add Logo+Kanalnummer/Signalbalken option
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@1494 e54a6e83-5905-42d5-8d5c-058d10e6a962
------------------
This commit was generated by Migit
This commit is contained in:
@@ -756,6 +756,7 @@ 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_6 Logo+Kanalnummer/Signalbalken
|
||||
miscsettings.infobar_disp_log Logo
|
||||
miscsettings.infobar_logo_hdd_dir Logo Verz.
|
||||
miscsettings.infobar_sat_display Kabel-/Satellitenanbieter
|
||||
|
@@ -756,6 +756,7 @@ miscsettings.infobar_disp_2 Logo 2
|
||||
miscsettings.infobar_disp_3 Logo 3
|
||||
miscsettings.infobar_disp_4 Logo 4
|
||||
miscsettings.infobar_disp_5 Logo 5
|
||||
miscsettings.infobar_disp_6 Logo 6
|
||||
miscsettings.infobar_disp_log Logo
|
||||
miscsettings.infobar_logo_hdd_dir Logo dir
|
||||
miscsettings.infobar_sat_display Satellite display on infobar
|
||||
|
@@ -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 && g_settings.infobar_show_channellogo != 5 ) /* 3 & 5 is "default" with sigscales etc. */
|
||||
if ( g_settings.infobar_show_channellogo != 3 && g_settings.infobar_show_channellogo != 5 && g_settings.infobar_show_channellogo != 6) /* 3 & 5 & 6 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;
|
||||
@@ -658,7 +658,10 @@ void CInfoViewer::showTitle (const int ChanNum, const std::string & Channel, con
|
||||
bool logo_ok = false;
|
||||
if (ChanNum) /* !fileplay */
|
||||
{
|
||||
ChannelLogoMode = showChannelLogo(channel_id); // get logo mode, paint channel logo if adjusted
|
||||
char strChanNum[10];
|
||||
snprintf (strChanNum, sizeof(strChanNum), "%d", ChanNum);
|
||||
const int channel_number_width =(g_settings.infobar_show_channellogo == 6) ? 5 + g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_CHANNAME]->getRenderWidth (strChanNum) : 0;
|
||||
ChannelLogoMode = showChannelLogo(channel_id,channel_number_width); // get logo mode, paint channel logo if adjusted
|
||||
logo_ok = ( g_settings.infobar_show_channellogo != 0 && ChannelLogoMode != 0);
|
||||
fprintf(stderr, "after showchannellogo, mode = %d ret = %d logo_ok = %d\n",g_settings.infobar_show_channellogo, ChannelLogoMode, logo_ok);
|
||||
|
||||
@@ -694,9 +697,6 @@ void CInfoViewer::showTitle (const int ChanNum, const std::string & Channel, con
|
||||
ChanNumYPos += 10;
|
||||
}
|
||||
|
||||
char strChanNum[10];
|
||||
snprintf (strChanNum, sizeof(strChanNum), "%d", ChanNum);
|
||||
|
||||
/* TODO: the logic will get much easier once we decouple channellogo and signal bars */
|
||||
if ((!logo_ok && g_settings.infobar_show_channellogo < 2) || g_settings.infobar_show_channellogo == 2 || g_settings.infobar_show_channellogo == 4) // no logo in numberbox
|
||||
{
|
||||
@@ -706,7 +706,7 @@ void CInfoViewer::showTitle (const int ChanNum, const std::string & Channel, con
|
||||
BoxStartX + (ChanWidth - tmpwidth) / 2, ChanNumYPos,
|
||||
ChanWidth, strChanNum, col_NumBoxText);
|
||||
}
|
||||
if (ChannelLogoMode == 1 || ( g_settings.infobar_show_channellogo == 3 && !logo_ok)) /* channel number besides channel name */
|
||||
if (ChannelLogoMode == 1 || ( g_settings.infobar_show_channellogo == 3 && !logo_ok) || g_settings.infobar_show_channellogo == 6 ) /* channel number besides channel name */
|
||||
{
|
||||
ChanNumWidth = 5 + g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_CHANNAME]->getRenderWidth (strChanNum);
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_CHANNAME]->RenderString(
|
||||
@@ -715,7 +715,7 @@ void CInfoViewer::showTitle (const int ChanNum, const std::string & Channel, con
|
||||
}
|
||||
}
|
||||
|
||||
if (g_settings.infobar_show_channellogo != 5 || !logo_ok) {
|
||||
if (g_settings.infobar_show_channellogo < 5 || !logo_ok) {
|
||||
if (ChannelLogoMode != 2) {
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_CHANNAME]->RenderString(
|
||||
ChanNameX + 10 + ChanNumWidth, ChanNameY + time_height,
|
||||
@@ -1293,7 +1293,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) || (! fileplay && g_settings.infobar_show_channellogo == 5)) {
|
||||
if (! fileplay && ( g_settings.infobar_show_channellogo == 3 || g_settings.infobar_show_channellogo == 5 || g_settings.infobar_show_channellogo == 6 )) {
|
||||
int chanH = g_SignalFont->getHeight();
|
||||
int freqStartY = BoxStartY + 2 * chanH - 3;
|
||||
if (newfreq && chanready) {
|
||||
@@ -1784,7 +1784,7 @@ returns mode of painted channel logo,
|
||||
2 = in place of channel name
|
||||
3 = beside channel name
|
||||
*******************************************************************************/
|
||||
int CInfoViewer::showChannelLogo(const t_channel_id logo_channel_id)
|
||||
int CInfoViewer::showChannelLogo(const t_channel_id logo_channel_id, const int channel_number_width)
|
||||
{
|
||||
if (!g_settings.infobar_show_channellogo) // show logo only if configured
|
||||
return 0;
|
||||
@@ -1828,7 +1828,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 || g_settings.infobar_show_channellogo == 5) // paint logo in place of channel name
|
||||
else if (g_settings.infobar_show_channellogo == 2 || g_settings.infobar_show_channellogo == 5 || g_settings.infobar_show_channellogo == 6) // paint logo in place of channel name
|
||||
{
|
||||
// check logo dimensions
|
||||
resize_logo(&logo_w, &logo_h, chan_w, time_height);
|
||||
@@ -1836,7 +1836,7 @@ int CInfoViewer::showChannelLogo(const t_channel_id logo_channel_id)
|
||||
// this is too ugly... ChannelName = "";
|
||||
// calculate logo position
|
||||
y_mid = ChanNameY + time_height / 2;
|
||||
logo_x = start_x + 10;
|
||||
logo_x = start_x + 10 + channel_number_width;;
|
||||
logo_y = y_mid - logo_h / 2;
|
||||
if (g_settings.infobar_show_channellogo == 2)
|
||||
res = 2;
|
||||
|
@@ -139,7 +139,7 @@ class CInfoViewer
|
||||
void showFailure();
|
||||
void showMotorMoving(int duration);
|
||||
void showLcdPercentOver();
|
||||
int showChannelLogo(const t_channel_id logo_channel_id);
|
||||
int showChannelLogo(const t_channel_id logo_channel_id, const int channel_number_width);
|
||||
void showSNR();
|
||||
void showInfoFile();
|
||||
void loop(int fadeValue, bool show_dot ,bool fadeIn);
|
||||
|
@@ -547,7 +547,7 @@ 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 6
|
||||
#define LOCALE_MISCSETTINGS_INFOBAR_DISP_OPTIONS_COUNT 7
|
||||
const CMenuOptionChooser::keyval LOCALE_MISCSETTINGS_INFOBAR_DISP_OPTIONS[LOCALE_MISCSETTINGS_INFOBAR_DISP_OPTIONS_COUNT]=
|
||||
{
|
||||
{ 0 , LOCALE_MISCSETTINGS_INFOBAR_DISP_0 },
|
||||
@@ -555,7 +555,8 @@ const CMenuOptionChooser::keyval LOCALE_MISCSETTINGS_INFOBAR_DISP_OPTIONS[LOCAL
|
||||
{ 2 , LOCALE_MISCSETTINGS_INFOBAR_DISP_2 },
|
||||
{ 3 , LOCALE_MISCSETTINGS_INFOBAR_DISP_3 },
|
||||
{ 4 , LOCALE_MISCSETTINGS_INFOBAR_DISP_4 },
|
||||
{ 5 , LOCALE_MISCSETTINGS_INFOBAR_DISP_5 }
|
||||
{ 5 , LOCALE_MISCSETTINGS_INFOBAR_DISP_5 },
|
||||
{ 6 , LOCALE_MISCSETTINGS_INFOBAR_DISP_6 }
|
||||
};
|
||||
|
||||
//infobar
|
||||
|
@@ -783,6 +783,7 @@ typedef enum
|
||||
LOCALE_MISCSETTINGS_INFOBAR_DISP_3,
|
||||
LOCALE_MISCSETTINGS_INFOBAR_DISP_4,
|
||||
LOCALE_MISCSETTINGS_INFOBAR_DISP_5,
|
||||
LOCALE_MISCSETTINGS_INFOBAR_DISP_6,
|
||||
LOCALE_MISCSETTINGS_INFOBAR_DISP_LOG,
|
||||
LOCALE_MISCSETTINGS_INFOBAR_LOGO_HDD_DIR,
|
||||
LOCALE_MISCSETTINGS_INFOBAR_SAT_DISPLAY,
|
||||
|
@@ -783,6 +783,7 @@ const char * locale_real_names[] =
|
||||
"miscsettings.infobar_disp_3",
|
||||
"miscsettings.infobar_disp_4",
|
||||
"miscsettings.infobar_disp_5",
|
||||
"miscsettings.infobar_disp_6",
|
||||
"miscsettings.infobar_disp_log",
|
||||
"miscsettings.infobar_logo_hdd_dir",
|
||||
"miscsettings.infobar_sat_display",
|
||||
|
Reference in New Issue
Block a user