Merge branch 'check/dvbsi++' commit 5db16ee2ff

Conflicts:
	src/eitd/sectionsd.cpp
	src/gui/audioplayer.cpp
	src/gui/channellist.cpp
	src/gui/components/Makefile.am
	src/gui/components/cc.h
	src/gui/components/components.cpp
	src/gui/moviebrowser.cpp
	src/gui/scan.cpp
	src/neutrino.cpp
	src/zapit/src/bouquets.cpp
	src/zapit/src/getservices.cpp
	src/zapit/src/transponder.cpp
This commit is contained in:
Stefan Seyfried
2013-02-21 17:07:18 +01:00
42 changed files with 871 additions and 330 deletions

View File

@@ -459,6 +459,22 @@ void CInfoViewer::show_current_next(bool new_chan, int epgpos)
// nicht gefunden / noch nicht geladen
/* see the comment in display_Info() for a reasoning for this calculation */
int CurrInfoY = (BoxEndY + ChanNameY + time_height) / 2; // lower end of current info box
if(g_settings.infobar_progressbar){
int pb_h = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getHeight() - 4;
switch(g_settings.infobar_progressbar)
{
case 1:
case 2:
CurrInfoY += (pb_h/3);
break;
case 3:
CurrInfoY -= (pb_h/3);
break;
default:
break;
}
}
neutrino_locale_t loc;
if (! gotTime)
loc = LOCALE_INFOVIEWER_WAITTIME;
@@ -726,8 +742,11 @@ void CInfoViewer::showTitle (const int ChanNum, const std::string & Channel, con
std::string prov_name = pname;
prov_name=prov_name.substr(prov_name.find_first_of("]")+1);
int chname_width = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_CHANNAME]->getRenderWidth (ChannelName);
chname_width += (chname_width/(ChannelName.size()-1)/2);
int chname_width = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_CHANNAME]->getRenderWidth (ChannelName, true);// UTF-8
unsigned int chann_size = ChannelName.size();
if(ChannelName.empty())
chann_size = 1;
chname_width += (chname_width/chann_size/2);
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString(
ChanNameX + 10 + ChanNumWidth + chname_width, ChanNameY + time_height -SHADOW_OFFSET/2,
BoxEndX - (ChanNameX + 20) - time_width - LEFT_OFFSET - 5 - ChanNumWidth - chname_width,
@@ -1435,30 +1454,67 @@ void CInfoViewer::display_Info(const char *current, const char *next,
int height = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->getHeight();
int CurrInfoY = (BoxEndY + ChanNameY + time_height) / 2;
int NextInfoY = CurrInfoY + height; // lower end of next info box
int xStart;
int InfoX = ChanInfoX + 10;
xStart = InfoX;
int xStart = InfoX;
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_infobar == 1)
colored_event_C = true;
if (g_settings.colored_events_infobar == 2)
colored_event_N = true;
int pb_h = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getHeight() - 4;
switch(g_settings.infobar_progressbar)
{
case 1:
case 2:
CurrInfoY += (pb_h/3);
NextInfoY += (pb_h/3);
break;
case 3:
CurrInfoY -= (pb_h/3);
NextInfoY += (pb_h/3);
break;
default:
break;
}
if (pb_pos > -1)
{
int pb_w = 112;
int pb_startx = BoxEndX - pb_w - SHADOW_OFFSET;
int pb_starty = ChanNameY - (pb_h + 10);
int pb_shadow = COL_INFOBAR_SHADOW_PLUS_0;
int pb_color = g_settings.progressbar_color ? COL_INFOBAR_SHADOW_PLUS_0 : COL_INFOBAR_PLUS_0;
if(g_settings.infobar_progressbar){
pb_startx = xStart;
pb_w = BoxEndX - 10 - xStart;
pb_shadow = 0;
}
switch(g_settings.infobar_progressbar)
{
case 1:
pb_starty = CurrInfoY - ((pb_h * 2) + (pb_h / 6)) ;
pb_h = (pb_h/3);
pb_color = COL_INFOBAR_SHADOW_PLUS_0;
break;
case 2:
pb_starty = CurrInfoY - ((pb_h * 2) + (pb_h / 5)) ;
pb_h = (pb_h/5);
pb_color = COL_INFOBAR_SHADOW_PLUS_0;
break;
case 3:
pb_starty = CurrInfoY + ((pb_h / 3)-(pb_h/5)) ;
pb_h = (pb_h/5);
break;
default:
break;
}
int pb_p = pb_pos * pb_w / 100;
int pb_h = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getHeight() - 4;
if (pb_p > pb_w)
pb_p = pb_w;
timescale->paintProgressBar(BoxEndX - pb_w - SHADOW_OFFSET, ChanNameY - (pb_h + 10) , pb_w, pb_h, pb_p, pb_w,
0, 0, g_settings.progressbar_color ? COL_INFOBAR_SHADOW_PLUS_0 : COL_INFOBAR_PLUS_0, COL_INFOBAR_SHADOW_PLUS_0, "", COL_INFOBAR);
timescale->paintProgressBar(pb_startx, pb_starty, pb_w, pb_h, pb_p, pb_w,
0, 0, pb_color, pb_shadow, "", COL_INFOBAR);
//printf("paintProgressBar(%d, %d, %d, %d)\n", BoxEndX - pb_w - SHADOW_OFFSET, ChanNameY - (pb_h + 10) , pb_w, pb_h);
}
@@ -1472,6 +1528,14 @@ void CInfoViewer::display_Info(const char *current, const char *next,
int nextTimeX = BoxEndX - nextTimeW - 10;
static int oldCurrTimeX = currTimeX; // remember the last pos. of remaining time, in case we change from 20/100min to 21/99min
//colored_events init
bool colored_event_C = false;
bool colored_event_N = false;
if (g_settings.colored_events_infobar == 1)
colored_event_C = true;
if (g_settings.colored_events_infobar == 2)
colored_event_N = true;
if (current != NULL && update_current)
{
frameBuffer->paintBox(InfoX, CurrInfoY - height, currTimeX, CurrInfoY, COL_INFOBAR_PLUS_0);
@@ -1722,7 +1786,7 @@ void CInfoViewer::showInfoFile()
/*if (recordModeActive)
return;*/
char infotext[80];
int fd, xStart, xOffset, yStart, width, height, tWidth, tIndent;
int fd, xStart, yStart, width, height, iOffset, oOffset, tWidth, tIndent, pb_w;
ssize_t cnt;
fd = open("/tmp/infobar.txt", O_RDONLY); //read textcontent from this file
@@ -1738,14 +1802,16 @@ void CInfoViewer::showInfoFile()
}
infotext[cnt-1] = '\0';
xStart = BoxStartX + ChanWidth + 140; //140px space for the little rec/ts-bar
xOffset = 5; //same value as the used RADIUS_SMALL
iOffset = RADIUS_SMALL; // inner left/right offset
oOffset = 140; // outer left/right offset
pb_w = 112; // same value as int pb_w in display_Info()
xStart = BoxStartX + ChanWidth + oOffset;
yStart = BoxStartY;
width = BoxEndX - xStart - 225; //225px space for the progress-bar
width = BoxEndX - xStart - (g_settings.infobar_progressbar ? oOffset : oOffset + pb_w);
height = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->getHeight() + 2;
tWidth = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->getRenderWidth(infotext);
if (tWidth < (width - (xOffset * 2)) )
tIndent = (width - (xOffset * 2) - tWidth) / 2;
if (tWidth < (width - (iOffset * 2)) )
tIndent = (width - (iOffset * 2) - tWidth) / 2;
else
tIndent = 0;
//shadow
@@ -1754,7 +1820,7 @@ void CInfoViewer::showInfoFile()
frameBuffer->paintBoxRel(xStart, yStart, width, height, COL_INFOBAR_PLUS_0, RADIUS_SMALL, CORNER_ALL);
//content
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString(
xStart + xOffset + tIndent, yStart + height, width - xOffset, (std::string)infotext, COL_INFOBAR, height, false);
xStart + iOffset + tIndent, yStart + height, width - iOffset, (std::string)infotext, COL_INFOBAR, height, false);
}
void CInfoViewer::killTitle()