summaryrefslogtreecommitdiff
path: root/timers.c
diff options
context:
space:
mode:
authorlouis <louis.braun@gmx.de>2013-10-03 10:37:54 +0200
committerlouis <louis.braun@gmx.de>2013-10-03 10:37:54 +0200
commit4a821c98ed14954c0fc2745ff7c2b99c75d56b1f (patch)
treea02d9e59cd0981a687934ff3416165d58b785ba2 /timers.c
parent1b7943aea0f17b8891f6b201ded6fadd17555972 (diff)
downloadskin-nopacity-4a821c98ed14954c0fc2745ff7c2b99c75d56b1f.tar.gz
skin-nopacity-4a821c98ed14954c0fc2745ff7c2b99c75d56b1f.tar.bz2
Added additional configurable channel logo cache
Diffstat (limited to 'timers.c')
-rw-r--r--timers.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/timers.c b/timers.c
index a90521d..929d5d7 100644
--- a/timers.c
+++ b/timers.c
@@ -176,13 +176,16 @@ void cNopacityTimer::DrawLogo(void) {
int logoWidth = config.timersLogoWidth;
int logoHeight = config.timersLogoHeight;
const cChannel *Channel = timer->Channel();
- if (Channel && Channel->Name()) {
- cImageLoader imgLoader;
- if (showTimerLogo && imgLoader.LoadLogo(Channel->Name(), logoWidth, logoHeight)) {
- pixmapLogo->DrawImage(cPoint((width - logoWidth)/2, 1), imgLoader.GetImage());
- } else if (showTimerLogo && imgLoader.LoadLogo(*(Channel->GetChannelID().ToString()), logoWidth, logoHeight)) {
- pixmapLogo->DrawImage(cPoint((width - logoWidth)/2, 1), imgLoader.GetImage());
- } else {
+ if (Channel) {
+ bool logoFound = false;
+ if (showTimerLogo) {
+ cImage *logo = imgCache->GetLogo(ctLogoTimer, Channel);
+ if (logo) {
+ logoFound = true;
+ pixmapLogo->DrawImage(cPoint((width - logoWidth)/2, 1), *logo);
+ }
+ }
+ if (!showTimerLogo || !logoFound) {
cTextWrapper channel;
channel.Set(Channel->Name(), fontLarge, width - 10);
int lines = channel.Lines();