mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-27 23:42:51 +02:00
optional colouring of NOW or NEXT event in infobar (patch by svenhoefer)
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-beta@1662 e54a6e83-5905-42d5-8d5c-058d10e6a962
Origin commit data
------------------
Branch: ni/coolstream
Commit: d93630be48
Author: gixxpunk <thomas.harfmann@gmail.com>
Date: 2011-09-04 (Sun, 04 Sep 2011)
Origin message was:
------------------
- optional colouring of NOW or NEXT event in infobar (patch by svenhoefer)
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-beta@1662 e54a6e83-5905-42d5-8d5c-058d10e6a962
------------------
This commit was generated by Migit
This commit is contained in:
@@ -336,6 +336,10 @@ extra.cache_txt Teletext zwischenspeichern
|
||||
extra.chadded Der aktuelle Kanal wird dem selektierten Bouquet hinzugefügt...\n
|
||||
extra.chalreadyinbq Der aktuelle Kanal ist bereits im selektierten Bouquet...\n
|
||||
extra.clear_log Logdatei löschen
|
||||
extra.colored_events Sendung farbig
|
||||
extra.colored_events_0 keine
|
||||
extra.colored_events_1 aktuelle
|
||||
extra.colored_events_2 nächste
|
||||
extra.dboxinfo Box-Info
|
||||
extra.east Osten
|
||||
extra.fec_1_2 1/2 S1_QPSK
|
||||
|
@@ -336,6 +336,10 @@ extra.cache_txt Cache teletext
|
||||
extra.chadded The current channel has been added to selected bouquet....\n
|
||||
extra.chalreadyinbq The current channel is already in selected bouquet....\n
|
||||
extra.clear_log Clear Log
|
||||
extra.colored_events Program colored
|
||||
extra.colored_events_0 none
|
||||
extra.colored_events_1 current
|
||||
extra.colored_events_2 next
|
||||
extra.dboxinfo Box Info
|
||||
extra.east East
|
||||
extra.fec_1_2 1/2
|
||||
|
@@ -33,7 +33,8 @@
|
||||
#ifndef __color__
|
||||
#define __color__
|
||||
|
||||
#define COL_MAXFREE 254-8*7 - 1
|
||||
#define COL_MAXFREE 254-8*8 - 1
|
||||
#define COL_COLORED_EVENTS_INFOBAR 254-8*8
|
||||
#define COL_INFOBAR_SHADOW 254-8*7
|
||||
#define COL_INFOBAR 254-8*6
|
||||
#define COL_MENUHEAD 254-8*5
|
||||
|
@@ -1652,6 +1652,14 @@ void CInfoViewer::display_Info(const char *current, const char *next,
|
||||
if (starttimes)
|
||||
xStart += info_time_width + 10;
|
||||
|
||||
//colored_events init
|
||||
bool colored_event_C = false;
|
||||
bool colored_event_N = false;
|
||||
if (g_settings.colored_events == 1)
|
||||
colored_event_C = true;
|
||||
if (g_settings.colored_events == 2)
|
||||
colored_event_N = true;
|
||||
|
||||
if (pb_pos > -1)
|
||||
{
|
||||
int pb_w = 112;
|
||||
@@ -1678,8 +1686,8 @@ void CInfoViewer::display_Info(const char *current, const char *next,
|
||||
{
|
||||
frameBuffer->paintBox(InfoX, CurrInfoY - height, currTimeX, CurrInfoY, COL_INFOBAR_PLUS_0);
|
||||
if (runningStart != NULL)
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString(InfoX, CurrInfoY, info_time_width, runningStart, COL_INFOBAR, 0, UTF8);
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString(xStart, CurrInfoY, currTimeX - xStart - 5, current, COL_INFOBAR, 0, UTF8);
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString(InfoX, CurrInfoY, info_time_width, runningStart, colored_event_C ? COL_COLORED_EVENTS_INFOBAR : COL_INFOBAR, 0, UTF8);
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString(xStart, CurrInfoY, currTimeX - xStart - 5, current, colored_event_C ? COL_COLORED_EVENTS_INFOBAR : COL_INFOBAR, 0, UTF8);
|
||||
oldCurrTimeX = currTimeX;
|
||||
}
|
||||
|
||||
@@ -1688,19 +1696,19 @@ void CInfoViewer::display_Info(const char *current, const char *next,
|
||||
frameBuffer->paintBox(oldCurrTimeX, CurrInfoY-height, BoxEndX, CurrInfoY, COL_INFOBAR_PLUS_0);
|
||||
oldCurrTimeX = currTimeX;
|
||||
if (currTimeW != 0)
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString(currTimeX, CurrInfoY, currTimeW, runningRest, COL_INFOBAR, 0, UTF8);
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString(currTimeX, CurrInfoY, currTimeW, runningRest, colored_event_C ? COL_COLORED_EVENTS_INFOBAR : COL_INFOBAR, 0, UTF8);
|
||||
|
||||
if (next != NULL && update_next)
|
||||
{
|
||||
frameBuffer->paintBox(InfoX, NextInfoY-height, BoxEndX, NextInfoY, COL_INFOBAR_PLUS_0);
|
||||
if (nextStart != NULL)
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString(InfoX, NextInfoY, info_time_width, nextStart, COL_INFOBAR, 0, UTF8);
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString(InfoX, NextInfoY, info_time_width, nextStart, colored_event_N ? COL_COLORED_EVENTS_INFOBAR : COL_INFOBAR, 0, UTF8);
|
||||
if (starttimes)
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString(xStart, NextInfoY, nextTimeX - xStart - 5, next, COL_INFOBAR, 0, UTF8);
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString(xStart, NextInfoY, nextTimeX - xStart - 5, next, colored_event_N ? COL_COLORED_EVENTS_INFOBAR : COL_INFOBAR, 0, UTF8);
|
||||
else
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->RenderString(xStart, NextInfoY, nextTimeX - xStart - 5, next, COL_INFOBAR, 0, UTF8);
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->RenderString(xStart, NextInfoY, nextTimeX - xStart - 5, next, colored_event_N ? COL_COLORED_EVENTS_INFOBAR : COL_INFOBAR, 0, UTF8);
|
||||
if (nextTimeW != 0)
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString(nextTimeX, NextInfoY, nextTimeW, nextDuration, COL_INFOBAR, 0, UTF8);
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString(nextTimeX, NextInfoY, nextTimeW, nextDuration, colored_event_N ? COL_COLORED_EVENTS_INFOBAR : COL_INFOBAR, 0, UTF8);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -261,6 +261,14 @@ const CMenuOptionChooser::keyval CHANNELLIST_EPGTEXT_ALIGN_RIGHT_OPTIONS[CHANNE
|
||||
{ 1 , LOCALE_CHANNELLIST_EPGTEXT_ALIGN_RIGHT }
|
||||
};
|
||||
|
||||
#define OPTIONS_COLORED_EVENTS_OPTION_COUNT 3
|
||||
const CMenuOptionChooser::keyval OPTIONS_COLORED_EVENTS_OPTIONS[OPTIONS_COLORED_EVENTS_OPTION_COUNT] =
|
||||
{
|
||||
{ 0, LOCALE_EXTRA_COLORED_EVENTS_0 }, //none
|
||||
{ 1, LOCALE_EXTRA_COLORED_EVENTS_1 }, //current
|
||||
{ 2, LOCALE_EXTRA_COLORED_EVENTS_2 }, //next
|
||||
};
|
||||
|
||||
|
||||
//show osd setup
|
||||
void COsdSetup::showOsdSetup()
|
||||
@@ -318,6 +326,7 @@ void COsdSetup::showOsdSetup()
|
||||
osd_menu->addItem(new CMenuOptionChooser(LOCALE_COLORMENU_FADE, &g_settings.widget_fade, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true ));
|
||||
osd_menu->addItem(new CMenuOptionChooser(LOCALE_EXTRA_BIGWINDOWS, &g_settings.big_windows, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true));
|
||||
osd_menu->addItem(new CMenuOptionChooser(LOCALE_PROGRESSBAR_COLOR, &g_settings.progressbar_color, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true));
|
||||
osd_menu->addItem(new CMenuOptionChooser(LOCALE_EXTRA_COLORED_EVENTS, &g_settings.colored_events, OPTIONS_COLORED_EVENTS_OPTIONS, OPTIONS_COLORED_EVENTS_OPTION_COUNT, true));
|
||||
|
||||
osd_menu->exec(NULL, "");
|
||||
osd_menu->hide();
|
||||
@@ -370,6 +379,12 @@ void COsdSetup::showOsdMenueColorSetup(CMenuWidget *menu_colors)
|
||||
menu_colors->addItem( new CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, LOCALE_COLORSTATUSBAR_TEXT));
|
||||
menu_colors->addItem( new CMenuForwarder(LOCALE_COLORMENU_BACKGROUND, true, NULL, chInfobarcolor ));
|
||||
menu_colors->addItem( new CMenuForwarder(LOCALE_COLORMENU_TEXTCOLOR, true, NULL, chInfobarTextcolor ));
|
||||
|
||||
CColorChooser* chColored_Events = new CColorChooser(LOCALE_COLORMENU_TEXTCOLOR, &g_settings.colored_events_red,
|
||||
&g_settings.colored_events_green, &g_settings.colored_events_blue, NULL, colorSetupNotifier);
|
||||
|
||||
menu_colors->addItem( new CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, LOCALE_EXTRA_COLORED_EVENTS));
|
||||
menu_colors->addItem( new CMenuForwarder(LOCALE_COLORMENU_TEXTCOLOR, true, NULL, chColored_Events ));
|
||||
}
|
||||
|
||||
|
||||
|
@@ -232,6 +232,10 @@ void CThemes::rememberOldTheme(bool remember)
|
||||
oldThemeValues[37] = g_settings.infobar_Text_red;
|
||||
oldThemeValues[38] = g_settings.infobar_Text_green;
|
||||
oldThemeValues[39] = g_settings.infobar_Text_blue;
|
||||
oldThemeValues[40] = g_settings.colored_events_alpha;
|
||||
oldThemeValues[41] = g_settings.colored_events_red;
|
||||
oldThemeValues[42] = g_settings.colored_events_green;
|
||||
oldThemeValues[43] = g_settings.colored_events_blue;
|
||||
} else {
|
||||
g_settings.menu_Head_alpha = oldThemeValues[0];
|
||||
g_settings.menu_Head_red = oldThemeValues[1];
|
||||
@@ -273,6 +277,10 @@ void CThemes::rememberOldTheme(bool remember)
|
||||
g_settings.infobar_Text_red = oldThemeValues[37];
|
||||
g_settings.infobar_Text_green = oldThemeValues[38];
|
||||
g_settings.infobar_Text_blue = oldThemeValues[39];
|
||||
g_settings.colored_events_alpha = oldThemeValues[40];
|
||||
g_settings.colored_events_red = oldThemeValues[41];
|
||||
g_settings.colored_events_green = oldThemeValues[42];
|
||||
g_settings.colored_events_blue = oldThemeValues[43];
|
||||
|
||||
notifier = new CColorSetupNotifier;
|
||||
notifier->changeNotify(NONEXISTANT_LOCALE, NULL);
|
||||
|
@@ -35,7 +35,7 @@ class CThemes : public CMenuTarget, CChangeObserver
|
||||
CColorSetupNotifier *notifier;
|
||||
|
||||
int width;
|
||||
int oldThemeValues[40];
|
||||
int oldThemeValues[44];
|
||||
|
||||
bool hasThemeChanged;
|
||||
|
||||
|
@@ -555,6 +555,12 @@ int CNeutrinoApp::loadSetup(const char * fname)
|
||||
g_settings.infobar_Text_green = configfile.getInt32( "infobar_Text_green", 0x64 );
|
||||
g_settings.infobar_Text_blue = configfile.getInt32( "infobar_Text_blue", 0x64 );
|
||||
|
||||
g_settings.colored_events = configfile.getInt32( "colored_events" , 0 );
|
||||
g_settings.colored_events_alpha = configfile.getInt32( "colored_events_alpha", 0x00 );
|
||||
g_settings.colored_events_red = configfile.getInt32( "colored_events_red", 95 );
|
||||
g_settings.colored_events_green = configfile.getInt32( "colored_events_green", 70 );
|
||||
g_settings.colored_events_blue = configfile.getInt32( "colored_events_blue", 0 );
|
||||
|
||||
//network
|
||||
for(int i=0 ; i < NETWORK_NFS_NR_OF_ENTRIES ; i++) {
|
||||
sprintf(cfg_key, "network_nfs_ip_%d", i);
|
||||
@@ -1108,6 +1114,12 @@ void CNeutrinoApp::saveSetup(const char * fname)
|
||||
configfile.setInt32( "infobar_Text_green", g_settings.infobar_Text_green );
|
||||
configfile.setInt32( "infobar_Text_blue", g_settings.infobar_Text_blue );
|
||||
|
||||
configfile.setInt32( "colored_events", g_settings.colored_events );
|
||||
configfile.setInt32( "colored_events_alpha", g_settings.colored_events_alpha );
|
||||
configfile.setInt32( "colored_events_red", g_settings.colored_events_red );
|
||||
configfile.setInt32( "colored_events_green", g_settings.colored_events_green );
|
||||
configfile.setInt32( "colored_events_blue", g_settings.colored_events_blue );
|
||||
|
||||
//network
|
||||
for(int i=0 ; i < NETWORK_NFS_NR_OF_ENTRIES ; i++) {
|
||||
sprintf(cfg_key, "network_nfs_ip_%d", i);
|
||||
@@ -4035,6 +4047,12 @@ void CNeutrinoApp::loadColors(const char * fname)
|
||||
g_settings.infobar_Text_red = tconfig.getInt32( "infobar_Text_red", 0x64 );
|
||||
g_settings.infobar_Text_green = tconfig.getInt32( "infobar_Text_green", 0x64 );
|
||||
g_settings.infobar_Text_blue = tconfig.getInt32( "infobar_Text_blue", 0x64 );
|
||||
|
||||
g_settings.colored_events_alpha = tconfig.getInt32( "colored_events_alpha", 0x00 );
|
||||
g_settings.colored_events_red = tconfig.getInt32( "colored_events_red", 95 );
|
||||
g_settings.colored_events_green = tconfig.getInt32( "colored_events_green", 70 );
|
||||
g_settings.colored_events_blue = tconfig.getInt32( "colored_events_blue", 0 );
|
||||
|
||||
for (int i = 0; i < SNeutrinoSettings::LCD_SETTING_COUNT; i++)
|
||||
g_settings.lcd_setting[i] = tconfig.getInt32(lcd_setting[i].name, lcd_setting[i].default_value);
|
||||
strcpy(g_settings.lcd_setting_dim_time, tconfig.getString("lcd_dim_time","0").c_str());
|
||||
@@ -4101,6 +4119,12 @@ void CNeutrinoApp::saveColors(const char * fname)
|
||||
tconfig.setInt32( "infobar_Text_red", g_settings.infobar_Text_red );
|
||||
tconfig.setInt32( "infobar_Text_green", g_settings.infobar_Text_green );
|
||||
tconfig.setInt32( "infobar_Text_blue", g_settings.infobar_Text_blue );
|
||||
|
||||
tconfig.setInt32( "colored_events_alpha", g_settings.colored_events_alpha );
|
||||
tconfig.setInt32( "colored_events_red", g_settings.colored_events_red );
|
||||
tconfig.setInt32( "colored_events_green", g_settings.colored_events_green );
|
||||
tconfig.setInt32( "colored_events_blue", g_settings.colored_events_blue );
|
||||
|
||||
for (int i = 0; i < SNeutrinoSettings::LCD_SETTING_COUNT; i++)
|
||||
tconfig.setInt32(lcd_setting[i].name, g_settings.lcd_setting[i]);
|
||||
tconfig.setString("lcd_dim_time", g_settings.lcd_setting_dim_time);
|
||||
|
@@ -363,6 +363,10 @@ typedef enum
|
||||
LOCALE_EXTRA_CHADDED,
|
||||
LOCALE_EXTRA_CHALREADYINBQ,
|
||||
LOCALE_EXTRA_CLEAR_LOG,
|
||||
LOCALE_EXTRA_COLORED_EVENTS,
|
||||
LOCALE_EXTRA_COLORED_EVENTS_0,
|
||||
LOCALE_EXTRA_COLORED_EVENTS_1,
|
||||
LOCALE_EXTRA_COLORED_EVENTS_2,
|
||||
LOCALE_EXTRA_DBOXINFO,
|
||||
LOCALE_EXTRA_EAST,
|
||||
LOCALE_EXTRA_FEC_1_2,
|
||||
|
@@ -363,6 +363,10 @@ const char * locale_real_names[] =
|
||||
"extra.chadded",
|
||||
"extra.chalreadyinbq",
|
||||
"extra.clear_log",
|
||||
"extra.colored_events",
|
||||
"extra.colored_events_0",
|
||||
"extra.colored_events_1",
|
||||
"extra.colored_events_2",
|
||||
"extra.dboxinfo",
|
||||
"extra.east",
|
||||
"extra.fec_1_2",
|
||||
|
@@ -489,6 +489,11 @@ bool CColorSetupNotifier::changeNotify(const neutrino_locale_t, void *)
|
||||
8, convertSetupAlpha2Alpha(g_settings.infobar_alpha) );
|
||||
|
||||
|
||||
frameBuffer->paletteGenFade(COL_COLORED_EVENTS_INFOBAR,
|
||||
convertSetupColor2RGB(g_settings.infobar_red, g_settings.infobar_green, g_settings.infobar_blue),
|
||||
convertSetupColor2RGB(g_settings.colored_events_red, g_settings.colored_events_green, g_settings.colored_events_blue),
|
||||
8, convertSetupAlpha2Alpha(g_settings.infobar_alpha) );
|
||||
|
||||
frameBuffer->paletteSet();
|
||||
return false;
|
||||
}
|
||||
|
@@ -204,6 +204,12 @@ struct SNeutrinoSettings
|
||||
unsigned char infobar_Text_green;
|
||||
unsigned char infobar_Text_blue;
|
||||
|
||||
unsigned char colored_events_alpha;
|
||||
unsigned char colored_events_red;
|
||||
unsigned char colored_events_green;
|
||||
unsigned char colored_events_blue;
|
||||
int colored_events;
|
||||
|
||||
//network
|
||||
#define NETWORK_NFS_NR_OF_ENTRIES 8
|
||||
std::string network_nfs_ip[NETWORK_NFS_NR_OF_ENTRIES];
|
||||
|
Reference in New Issue
Block a user