summaryrefslogtreecommitdiff
path: root/displaychannel.c
diff options
context:
space:
mode:
authorlouis <louis.braun@gmx.de>2013-05-10 12:57:28 +0200
committerlouis <louis.braun@gmx.de>2013-05-10 12:57:28 +0200
commit5709f0596f4ef4bc563ffc5e6735653f20241f43 (patch)
tree490031ae014e3f0012ff1bdd76709f1ec850c475 /displaychannel.c
parent15db5e81ccf049d7d3cb365f699d7290472ad9f9 (diff)
downloadskin-nopacity-5709f0596f4ef4bc563ffc5e6735653f20241f43.tar.gz
skin-nopacity-5709f0596f4ef4bc563ffc5e6735653f20241f43.tar.bz2
Added optional display of channel source information in channel display
Diffstat (limited to 'displaychannel.c')
-rw-r--r--displaychannel.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/displaychannel.c b/displaychannel.c
index 919ebb0..979d1ea 100644
--- a/displaychannel.c
+++ b/displaychannel.c
@@ -109,6 +109,7 @@ void cNopacityDisplayChannel::SetGeometry(void) {
streamInfoY = channelInfoHeight + progressBarHeight + epgInfoHeight;
iconSize = config.statusIconSize;
iconsWidth = 5*iconSize;
+ signalX = 0;
}
void cNopacityDisplayChannel::CreatePixmaps(void) {
@@ -480,6 +481,18 @@ void cNopacityDisplayChannel::DrawSignal(void) {
}
}
+void cNopacityDisplayChannel::DrawSourceInfo(const cChannel *Channel) {
+ const cSource *source = Sources.Get(Channel->Source());
+ cString channelInfo = "";
+ if (source)
+ channelInfo = cString::sprintf("%s - %s", *cSource::ToString(source->Code()), source->Description());
+ int x = signalX + 20;
+ if (config.displaySignalStrength)
+ x += signalWidth;
+ pixmapFooter->DrawText(cPoint(x, (streamInfoHeight - fontDate->Height())/2), channelInfo, Theme.Color(clrChannelHead), clrTransparent, fontDate);
+
+}
+
void cNopacityDisplayChannel::SetChannel(const cChannel *Channel, int Number) {
if (!doOutput)
return;
@@ -519,6 +532,8 @@ void cNopacityDisplayChannel::SetChannel(const cChannel *Channel, int Number) {
} else {
DrawIconsSingle(Channel);
}
+ if (config.displaySourceInfo)
+ DrawSourceInfo(Channel);
}
cString channelString = cString::sprintf("%s %s", *ChannelNumber, *ChannelName);
pixmapChannelInfo->DrawText(cPoint(channelInfoHeight/2, (channelInfoHeight-fontHeader->Height())/2), channelString, Theme.Color(clrChannelHead), clrTransparent, fontHeader);