mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 00:11:14 +02:00
add channellogo menu
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@183 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
@@ -709,6 +709,11 @@ miscsettings.fb_destination EXPERT! Boot-Konsole
|
|||||||
miscsettings.general Allgemein
|
miscsettings.general Allgemein
|
||||||
miscsettings.head Diverse Einstellungen
|
miscsettings.head Diverse Einstellungen
|
||||||
miscsettings.hwsections EPG Daten per Hardware filtern
|
miscsettings.hwsections EPG Daten per Hardware filtern
|
||||||
|
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_sat_display Infobar Satellitenanzeige
|
miscsettings.infobar_sat_display Infobar Satellitenanzeige
|
||||||
miscsettings.noaviawatchdog AVIA-Watchdog aktivieren
|
miscsettings.noaviawatchdog AVIA-Watchdog aktivieren
|
||||||
miscsettings.noenxwatchdog eNX-Watchdog aktivieren
|
miscsettings.noenxwatchdog eNX-Watchdog aktivieren
|
||||||
|
@@ -492,6 +492,11 @@ miscsettings.fb_destination Expert! Boot-Console
|
|||||||
miscsettings.general General
|
miscsettings.general General
|
||||||
miscsettings.head Misc settings
|
miscsettings.head Misc settings
|
||||||
miscsettings.hwsections use hardware sections
|
miscsettings.hwsections use hardware sections
|
||||||
|
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_sat_display Satellite display on infobar
|
miscsettings.infobar_sat_display Satellite display on infobar
|
||||||
miscsettings.noaviawatchdog enable AVIA watchdog
|
miscsettings.noaviawatchdog enable AVIA watchdog
|
||||||
miscsettings.noenxwatchdog enable eNX watchdog
|
miscsettings.noenxwatchdog enable eNX watchdog
|
||||||
|
@@ -93,10 +93,6 @@ extern t_channel_id live_channel_id; //zapit
|
|||||||
|
|
||||||
#define ROUND_RADIUS 7
|
#define ROUND_RADIUS 7
|
||||||
|
|
||||||
/* ###################### TODO: add to GUI settings ################# */
|
|
||||||
int infobar_show_channellogo = 3;
|
|
||||||
/* ################################################################## */
|
|
||||||
|
|
||||||
int time_left_width;
|
int time_left_width;
|
||||||
int time_dot_width;
|
int time_dot_width;
|
||||||
int time_width;
|
int time_width;
|
||||||
@@ -162,11 +158,6 @@ void CInfoViewer::Init()
|
|||||||
chanready = 1;
|
chanready = 1;
|
||||||
fileplay = 0;
|
fileplay = 0;
|
||||||
|
|
||||||
/* I'm too lazy to code a menu now */
|
|
||||||
char *tmp = getenv("LOGO_POS");
|
|
||||||
if (tmp)
|
|
||||||
infobar_show_channellogo = atoi(tmp);
|
|
||||||
|
|
||||||
/* maybe we should not tie this to the blinkenlights settings? */
|
/* maybe we should not tie this to the blinkenlights settings? */
|
||||||
if (g_settings.progressbar_color)
|
if (g_settings.progressbar_color)
|
||||||
bottom_bar_offset = 22;
|
bottom_bar_offset = 22;
|
||||||
@@ -215,7 +206,7 @@ void CInfoViewer::start ()
|
|||||||
25;
|
25;
|
||||||
InfoHeightY_Info = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getHeight()+ 5;
|
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) /* 3 is "old default" with sigscales etc. */
|
||||||
{
|
{
|
||||||
ChanWidth = 4 * g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_NUMBER]->getRenderWidth(widest_number) + 10;
|
ChanWidth = 4 * g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_NUMBER]->getRenderWidth(widest_number) + 10;
|
||||||
ChanHeight = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_NUMBER]->getHeight() * 9 / 8;
|
ChanHeight = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_NUMBER]->getHeight() * 9 / 8;
|
||||||
@@ -381,6 +372,19 @@ void CInfoViewer::showTitle (const int ChanNum, const std::string & Channel, con
|
|||||||
changePB();
|
changePB();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( g_settings.infobar_show_channellogo != 3) /* 3 is "old 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;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{ /* default mode, with signal bars etc. */
|
||||||
|
ChanWidth = 122;
|
||||||
|
ChanHeight = 74;
|
||||||
|
}
|
||||||
|
ChanNameY = BoxStartY + (ChanHeight / 2) + SHADOW_OFFSET; //oberkante schatten?
|
||||||
|
ChanInfoX = BoxStartX + (ChanWidth / 3);
|
||||||
|
|
||||||
is_visible = true;
|
is_visible = true;
|
||||||
if (!calledFromNumZap && fadeIn)
|
if (!calledFromNumZap && fadeIn)
|
||||||
fadeTimer = g_RCInput->addTimer (FADE_TIME, false);
|
fadeTimer = g_RCInput->addTimer (FADE_TIME, false);
|
||||||
@@ -490,8 +494,8 @@ void CInfoViewer::showTitle (const int ChanNum, const std::string & Channel, con
|
|||||||
|
|
||||||
|
|
||||||
int ChannelLogoMode = showChannelLogo(channel_id); // get logo mode, paint channel logo if adjusted
|
int ChannelLogoMode = showChannelLogo(channel_id); // get logo mode, paint channel logo if adjusted
|
||||||
bool logo_ok = (/*g_settings.*/infobar_show_channellogo != 0 && ChannelLogoMode != 0);
|
bool logo_ok = ( g_settings.infobar_show_channellogo != 0 && ChannelLogoMode != 0);
|
||||||
fprintf(stderr, "after showchannellogo, mode = %d ret = %d logo_ok = %d\n",infobar_show_channellogo, ChannelLogoMode, logo_ok);
|
fprintf(stderr, "after showchannellogo, mode = %d ret = %d logo_ok = %d\n",g_settings.infobar_show_channellogo, ChannelLogoMode, logo_ok);
|
||||||
|
|
||||||
paintTime (show_dot, true);
|
paintTime (show_dot, true);
|
||||||
showRecordIcon (show_dot);
|
showRecordIcon (show_dot);
|
||||||
@@ -514,7 +518,7 @@ fprintf(stderr, "after showchannellogo, mode = %d ret = %d logo_ok = %d\n",infob
|
|||||||
if (ChanNum) /* !fileplay */
|
if (ChanNum) /* !fileplay */
|
||||||
{
|
{
|
||||||
/* TODO: the logic will get much easier once we decouple channellogo and signal bars */
|
/* TODO: the logic will get much easier once we decouple channellogo and signal bars */
|
||||||
if ((!logo_ok && /*g_settings.*/infobar_show_channellogo < 2) || infobar_show_channellogo == 2) // no logo in numberbox
|
if ((!logo_ok && g_settings.infobar_show_channellogo < 2) || g_settings.infobar_show_channellogo == 2) // no logo in numberbox
|
||||||
{
|
{
|
||||||
// show number in numberbox
|
// show number in numberbox
|
||||||
int tmpwidth = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_NUMBER]->getRenderWidth(strChanNum);
|
int tmpwidth = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_NUMBER]->getRenderWidth(strChanNum);
|
||||||
@@ -522,7 +526,7 @@ fprintf(stderr, "after showchannellogo, mode = %d ret = %d logo_ok = %d\n",infob
|
|||||||
BoxStartX + (ChanWidth - tmpwidth) / 2, ChanNumYPos,
|
BoxStartX + (ChanWidth - tmpwidth) / 2, ChanNumYPos,
|
||||||
ChanWidth, strChanNum, col_NumBoxText);
|
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)) /* channel number besides channel name */
|
||||||
{
|
{
|
||||||
ChanNumWidth = 5 + g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_CHANNAME]->getRenderWidth (strChanNum);
|
ChanNumWidth = 5 + g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_CHANNAME]->getRenderWidth (strChanNum);
|
||||||
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_CHANNAME]->RenderString(
|
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_CHANNAME]->RenderString(
|
||||||
@@ -1092,7 +1096,7 @@ void CInfoViewer::showSNR ()
|
|||||||
|
|
||||||
/* right now, infobar_show_channellogo == 3 is the trigger for signal bars etc.
|
/* right now, infobar_show_channellogo == 3 is the trigger for signal bars etc.
|
||||||
TODO: decouple this */
|
TODO: decouple this */
|
||||||
if (! fileplay && /*g_settings.*/infobar_show_channellogo == 3) {
|
if (! fileplay && g_settings.infobar_show_channellogo == 3) {
|
||||||
if (newfreq && chanready) {
|
if (newfreq && chanready) {
|
||||||
char freq[20];
|
char freq[20];
|
||||||
|
|
||||||
@@ -1584,7 +1588,7 @@ returns mode of painted channel logo,
|
|||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
int CInfoViewer::showChannelLogo(const t_channel_id logo_channel_id)
|
int CInfoViewer::showChannelLogo(const t_channel_id logo_channel_id)
|
||||||
{
|
{
|
||||||
if (!/*g_settings.*/infobar_show_channellogo) // show logo only if configured
|
if (!g_settings.infobar_show_channellogo) // show logo only if configured
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
char strChanId[16];
|
char strChanId[16];
|
||||||
@@ -1640,7 +1644,7 @@ int CInfoViewer::showChannelLogo(const t_channel_id logo_channel_id)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (/*g_settings.*/infobar_show_channellogo == 1) // paint logo in numberbox
|
if (g_settings.infobar_show_channellogo == 1) // paint logo in numberbox
|
||||||
{
|
{
|
||||||
// calculate mid of numberbox
|
// calculate mid of numberbox
|
||||||
int satNameHeight = g_settings.infobar_sat_display ? g_SignalFont->getHeight() : 0;
|
int satNameHeight = g_settings.infobar_sat_display ? g_SignalFont->getHeight() : 0;
|
||||||
@@ -1655,7 +1659,7 @@ int CInfoViewer::showChannelLogo(const t_channel_id logo_channel_id)
|
|||||||
logo_y = y_mid - logo_h / 2;
|
logo_y = y_mid - logo_h / 2;
|
||||||
res = 1;
|
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) // paint logo in place of channel name
|
||||||
{
|
{
|
||||||
// check logo dimensions
|
// check logo dimensions
|
||||||
resize_logo(&logo_w, &logo_h, chan_w, time_height);
|
resize_logo(&logo_w, &logo_h, chan_w, time_height);
|
||||||
@@ -1667,7 +1671,7 @@ int CInfoViewer::showChannelLogo(const t_channel_id logo_channel_id)
|
|||||||
logo_y = y_mid - logo_h / 2;
|
logo_y = y_mid - logo_h / 2;
|
||||||
res = 2;
|
res = 2;
|
||||||
}
|
}
|
||||||
else if (/*g_settings.*/infobar_show_channellogo == 3) // paint logo beside channel name
|
else if (g_settings.infobar_show_channellogo == 3) // paint logo beside channel name
|
||||||
{
|
{
|
||||||
// check logo dimensions
|
// check logo dimensions
|
||||||
int Logo_max_width = chan_w - logo_w - 10;
|
int Logo_max_width = chan_w - logo_w - 10;
|
||||||
|
@@ -1469,6 +1469,15 @@ const CMenuOptionChooser::keyval_ext CPU_FREQ_OPTIONS[CPU_FREQ_OPTION_COUNT] =
|
|||||||
{ 600, NONEXISTANT_LOCALE, "600 Mhz"},
|
{ 600, NONEXISTANT_LOCALE, "600 Mhz"},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#define LOCALE_MISCSETTINGS_INFOBAR_DISP_OPTIONS_COUNT 4
|
||||||
|
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 }
|
||||||
|
};
|
||||||
|
|
||||||
void CNeutrinoApp::InitMiscSettings(CMenuWidget &miscSettings)
|
void CNeutrinoApp::InitMiscSettings(CMenuWidget &miscSettings)
|
||||||
{
|
{
|
||||||
dprintf(DEBUG_DEBUG, "init miscsettings\n");
|
dprintf(DEBUG_DEBUG, "init miscsettings\n");
|
||||||
@@ -1554,6 +1563,10 @@ void CNeutrinoApp::InitMiscSettings(CMenuWidget &miscSettings)
|
|||||||
funNotifier->changeNotify(NONEXISTANT_LOCALE, (void*) &g_settings.fan_speed);
|
funNotifier->changeNotify(NONEXISTANT_LOCALE, (void*) &g_settings.fan_speed);
|
||||||
CMenuOptionChooser *m1 = new CMenuOptionChooser(LOCALE_PROGRESSBAR_COLOR, &g_settings.progressbar_color, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true);
|
CMenuOptionChooser *m1 = new CMenuOptionChooser(LOCALE_PROGRESSBAR_COLOR, &g_settings.progressbar_color, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true);
|
||||||
miscSettings.addItem(m1);
|
miscSettings.addItem(m1);
|
||||||
|
//
|
||||||
|
CMenuOptionChooser *m2 = new CMenuOptionChooser(LOCALE_MISCSETTINGS_INFOBAR_DISP_LOG, &g_settings.infobar_show_channellogo, LOCALE_MISCSETTINGS_INFOBAR_DISP_OPTIONS, LOCALE_MISCSETTINGS_INFOBAR_DISP_OPTIONS_COUNT, true);
|
||||||
|
miscSettings.addItem(m2);
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
CCpuFreqNotifier * cpuNotifier = new CCpuFreqNotifier();
|
CCpuFreqNotifier * cpuNotifier = new CCpuFreqNotifier();
|
||||||
miscSettings.addItem(new CMenuOptionChooser(LOCALE_CPU_FREQ_NORMAL, &g_settings.cpufreq, CPU_FREQ_OPTIONS, CPU_FREQ_OPTION_COUNT, true, cpuNotifier));
|
miscSettings.addItem(new CMenuOptionChooser(LOCALE_CPU_FREQ_NORMAL, &g_settings.cpufreq, CPU_FREQ_OPTIONS, CPU_FREQ_OPTION_COUNT, true, cpuNotifier));
|
||||||
|
@@ -526,6 +526,11 @@ typedef enum {
|
|||||||
LOCALE_MISCSETTINGS_GENERAL,
|
LOCALE_MISCSETTINGS_GENERAL,
|
||||||
LOCALE_MISCSETTINGS_HEAD,
|
LOCALE_MISCSETTINGS_HEAD,
|
||||||
LOCALE_MISCSETTINGS_HWSECTIONS,
|
LOCALE_MISCSETTINGS_HWSECTIONS,
|
||||||
|
LOCALE_MISCSETTINGS_INFOBAR_DISP_0,
|
||||||
|
LOCALE_MISCSETTINGS_INFOBAR_DISP_1,
|
||||||
|
LOCALE_MISCSETTINGS_INFOBAR_DISP_2,
|
||||||
|
LOCALE_MISCSETTINGS_INFOBAR_DISP_3,
|
||||||
|
LOCALE_MISCSETTINGS_INFOBAR_DISP_LOG,
|
||||||
LOCALE_MISCSETTINGS_INFOBAR_SAT_DISPLAY,
|
LOCALE_MISCSETTINGS_INFOBAR_SAT_DISPLAY,
|
||||||
LOCALE_MISCSETTINGS_SHUTDOWN_COUNT,
|
LOCALE_MISCSETTINGS_SHUTDOWN_COUNT,
|
||||||
LOCALE_MISCSETTINGS_SHUTDOWN_COUNT_HINT1,
|
LOCALE_MISCSETTINGS_SHUTDOWN_COUNT_HINT1,
|
||||||
|
@@ -526,6 +526,11 @@ const char *locale_real_names[] = {
|
|||||||
"miscsettings.general",
|
"miscsettings.general",
|
||||||
"miscsettings.head",
|
"miscsettings.head",
|
||||||
"miscsettings.hwsections",
|
"miscsettings.hwsections",
|
||||||
|
"miscsettings.infobar_disp_0",
|
||||||
|
"miscsettings.infobar_disp_1",
|
||||||
|
"miscsettings.infobar_disp_2",
|
||||||
|
"miscsettings.infobar_disp_3",
|
||||||
|
"miscsettings.infobar_disp_log",
|
||||||
"miscsettings.infobar_sat_display",
|
"miscsettings.infobar_sat_display",
|
||||||
"miscsettings.shutdown_count",
|
"miscsettings.shutdown_count",
|
||||||
"miscsettings.shutdown_count_hint1",
|
"miscsettings.shutdown_count_hint1",
|
||||||
|
Reference in New Issue
Block a user