summaryrefslogtreecommitdiff
path: root/displaychannel.c
diff options
context:
space:
mode:
authorMartin Schirrmacher <vdr.skinflatplus@schirrmacher.eu>2015-05-12 13:38:33 +0200
committerMartin Schirrmacher <vdr.skinflatplus@schirrmacher.eu>2015-05-12 13:38:33 +0200
commit55188e8353da8fc0186d3f3cb37d5e164905db70 (patch)
tree67b0e0160c1d62d2b16fa5f6f7c0d39407a87140 /displaychannel.c
parent157407f4c1b4a264a4a8f4cd01612ea1d85cb1fc (diff)
downloadskin-flatplus-55188e8353da8fc0186d3f3cb37d5e164905db70.tar.gz
skin-flatplus-55188e8353da8fc0186d3f3cb37d5e164905db70.tar.bz2
update dvbapi info view
Diffstat (limited to 'displaychannel.c')
-rw-r--r--displaychannel.c36
1 files changed, 29 insertions, 7 deletions
diff --git a/displaychannel.c b/displaychannel.c
index b73d71ec..982b8bd8 100644
--- a/displaychannel.c
+++ b/displaychannel.c
@@ -564,11 +564,11 @@ void cFlatDisplayChannel::DvbapiInfoDraw(void) {
ecmInfo.ecmtime = -1;
ecmInfo.hops = -1;
- /*
+/*
ecmInfo.cardsystem = "nagravision";
ecmInfo.reader = "kd";
ecmInfo.ecmtime = 200;
- */
+*/
dsyslog("ChannelSid: %d Channel: %s", ChannelSid, CurChannel->Name());
@@ -584,26 +584,48 @@ void cFlatDisplayChannel::DvbapiInfoDraw(void) {
if (ecmInfo.hops < 0 || ecmInfo.ecmtime <= 0)
return;
+
+ if (ecmInfo.ecmtime > 9999 )
+ return;
+
int top = fontHeight*2 + fontSmlHeight*2 + marginItem;
- top += max(fontSmlHeight, Config.decorProgressSignalSize) - (Config.decorProgressSignalSize*2) - marginItem;
+ top += max(fontSmlHeight, Config.decorProgressSignalSize) - (Config.decorProgressSignalSize*2) - marginItem*2;
int left = BitrateRight + marginItem * 2;
if (BitrateRight == 0 )
left = SignalStrengthRight + marginItem * 2;
- cFont *dvbapiInfoFont = cFont::CreateFont(Setup.FontOsd, (Config.decorProgressSignalSize*2));
+ cFont *dvbapiInfoFont = cFont::CreateFont(Setup.FontOsd, (Config.decorProgressSignalSize*2) + marginItem);
cString dvbapiInfoText;
- dvbapiInfoText = cString::sprintf("DVBAPI - %s %s %s %s (%d)", tr("System"), *ecmInfo.cardsystem, tr("from"), *ecmInfo.reader, ecmInfo.ecmtime);
+ dvbapiInfoText = cString::sprintf("DVBAPI: ");
chanInfoBottomPixmap->DrawText(cPoint(left, top), dvbapiInfoText, Theme.Color(clrChannelSignalFont), Theme.Color(clrChannelBg), dvbapiInfoFont, dvbapiInfoFont->Width(dvbapiInfoText) * 2);
+ left += dvbapiInfoFont->Width(dvbapiInfoText) + marginItem;
+ cImage *img = NULL;
+ cString iconName = cString::sprintf("crypt_%s", *ecmInfo.cardsystem);
+ img = imgLoader.LoadIcon(*iconName, 999, dvbapiInfoFont->Height());
+ if( img ) {
+ chanIconsPixmap->DrawImage(cPoint(left, top), *img);
+ left += img->Width() + marginItem;
+ } else {
+ iconName = "crypt_unknown";
+ img = imgLoader.LoadIcon(*iconName, 999, dvbapiInfoFont->Height());
+ if( img ) {
+ chanIconsPixmap->DrawImage(cPoint(left, top), *img);
+ left += img->Width() + marginItem;
+ }
+ }
+
+ dvbapiInfoText = cString::sprintf(" %s (%d ms)", *ecmInfo.reader, ecmInfo.ecmtime);
+ chanInfoBottomPixmap->DrawText(cPoint(left, top), dvbapiInfoText, Theme.Color(clrChannelSignalFont), Theme.Color(clrChannelBg), dvbapiInfoFont, dvbapiInfoFont->Width(dvbapiInfoText) * 2);
}
void cFlatDisplayChannel::BitrateDraw(void) {
int top = fontHeight*2 + fontSmlHeight*2 + marginItem;
- top += max(fontSmlHeight, Config.decorProgressSignalSize) - (Config.decorProgressSignalSize*2) - marginItem;
+ top += max(fontSmlHeight, Config.decorProgressSignalSize) - (Config.decorProgressSignalSize*2) - marginItem*2;
int left = SignalStrengthRight + marginItem * 4;
cFont *SignalFont = cFont::CreateFont(Setup.FontOsd, Config.decorProgressSignalSize);
- cFont *BitrateFont = cFont::CreateFont(Setup.FontOsd, (Config.decorProgressSignalSize*2));
+ cFont *BitrateFont = cFont::CreateFont(Setup.FontOsd, (Config.decorProgressSignalSize*2) + marginItem);
/*
if( Config.SignalQualityShow ) {