diff options
author | louis <louis.braun@gmx.de> | 2013-05-04 16:21:30 +0200 |
---|---|---|
committer | louis <louis.braun@gmx.de> | 2013-05-04 16:21:30 +0200 |
commit | 1bfdd7c81c641cc0e782b7bf360497b060a1d39b (patch) | |
tree | b78378dddfbeb1db07cd687dc5c212bd7d35d9e8 /displaychannel.c | |
parent | 947bc6c842c5452cd8451a5f4cace918d7dbe917 (diff) | |
download | skin-nopacity-1bfdd7c81c641cc0e782b7bf360497b060a1d39b.tar.gz skin-nopacity-1bfdd7c81c641cc0e782b7bf360497b060a1d39b.tar.bz2 |
Ignoring first DisplayChannel call
Diffstat (limited to 'displaychannel.c')
-rw-r--r-- | displaychannel.c | 95 |
1 files changed, 53 insertions, 42 deletions
diff --git a/displaychannel.c b/displaychannel.c index 22d4b48..bdd23c8 100644 --- a/displaychannel.c +++ b/displaychannel.c @@ -4,6 +4,12 @@ #include "displaychannel.h" cNopacityDisplayChannel::cNopacityDisplayChannel(bool WithInfo) { + if (firstDisplay) { + firstDisplay = false; + doOutput = false; + return; + } else + doOutput = true; config.setDynamicValues(); withInfo = WithInfo; groupSep = false; @@ -22,54 +28,53 @@ cNopacityDisplayChannel::cNopacityDisplayChannel(bool WithInfo) { FadeTime = config.channelFadeTime; lastDate = ""; SetGeometry(); - if (osd) { - CreatePixmaps(); - CreateFonts(); - DrawBackground(); - DrawSignalMeter(); - } + CreatePixmaps(); + CreateFonts(); + DrawBackground(); + DrawSignalMeter(); } cNopacityDisplayChannel::~cNopacityDisplayChannel() { + if (!doOutput) + return; Cancel(-1); while (Active()) cCondWait::SleepMs(10); - if (osd) { - osd->DestroyPixmap(pixmapBackgroundTop); - osd->DestroyPixmap(pixmapBackgroundBottom); - osd->DestroyPixmap(pixmapLogo); - osd->DestroyPixmap(pixmapLogoBackground); - osd->DestroyPixmap(pixmapLogoBackgroundTop); - osd->DestroyPixmap(pixmapLogoBackgroundBottom); - osd->DestroyPixmap(pixmapChannelInfo); - osd->DestroyPixmap(pixmapDate); - if (withInfo) { - osd->DestroyPixmap(pixmapBackgroundMiddle); - osd->DestroyPixmap(pixmapProgressBar); - osd->DestroyPixmap(pixmapEPGInfo); - } - if (pixmapScreenResolution) - osd->DestroyPixmap(pixmapScreenResolution); - osd->DestroyPixmap(pixmapFooter); - osd->DestroyPixmap(pixmapStreamInfo); - osd->DestroyPixmap(pixmapStreamInfoBack); - if (config.displaySignalStrength && showSignal) { - osd->DestroyPixmap(pixmapSignalStrength); - osd->DestroyPixmap(pixmapSignalQuality); - osd->DestroyPixmap(pixmapSignalMeter); - osd->DestroyPixmap(pixmapSignalLabel); - } - if (config.displaySignalStrength && showSignal) { - delete fontInfoline; - } - delete fontHeader; - delete fontDate; - delete fontEPG; - delete fontEPGSmall; - delete fontChannelGroup; - delete fontChannelGroupSmall; - delete osd; - } + + osd->DestroyPixmap(pixmapBackgroundTop); + osd->DestroyPixmap(pixmapBackgroundBottom); + osd->DestroyPixmap(pixmapLogo); + osd->DestroyPixmap(pixmapLogoBackground); + osd->DestroyPixmap(pixmapLogoBackgroundTop); + osd->DestroyPixmap(pixmapLogoBackgroundBottom); + osd->DestroyPixmap(pixmapChannelInfo); + osd->DestroyPixmap(pixmapDate); + if (withInfo) { + osd->DestroyPixmap(pixmapBackgroundMiddle); + osd->DestroyPixmap(pixmapProgressBar); + osd->DestroyPixmap(pixmapEPGInfo); + } + if (pixmapScreenResolution) + osd->DestroyPixmap(pixmapScreenResolution); + osd->DestroyPixmap(pixmapFooter); + osd->DestroyPixmap(pixmapStreamInfo); + osd->DestroyPixmap(pixmapStreamInfoBack); + if (config.displaySignalStrength && showSignal) { + osd->DestroyPixmap(pixmapSignalStrength); + osd->DestroyPixmap(pixmapSignalQuality); + osd->DestroyPixmap(pixmapSignalMeter); + osd->DestroyPixmap(pixmapSignalLabel); + } + if (config.displaySignalStrength && showSignal) { + delete fontInfoline; + } + delete fontHeader; + delete fontDate; + delete fontEPG; + delete fontEPGSmall; + delete fontChannelGroup; + delete fontChannelGroupSmall; + delete osd; } void cNopacityDisplayChannel::SetGeometry(void) { @@ -397,6 +402,8 @@ void cNopacityDisplayChannel::DrawSignal(void) { } void cNopacityDisplayChannel::SetChannel(const cChannel *Channel, int Number) { + if (!doOutput) + return; pixmapLogo->Fill(clrTransparent); pixmapChannelInfo->Fill(clrTransparent); pixmapStreamInfo->Fill(clrTransparent); @@ -518,6 +525,8 @@ cString cNopacityDisplayChannel::GetChannelSep(const cChannel *channel, bool pre } void cNopacityDisplayChannel::SetEvents(const cEvent *Present, const cEvent *Following) { + if (!doOutput) + return; if (!withInfo) return; if (present != Present) @@ -630,6 +639,8 @@ void cNopacityDisplayChannel::SetMessage(eMessageType Type, const char *Text) { } void cNopacityDisplayChannel::Flush(void) { + if (!doOutput) + return; DrawDate(); if (!groupSep) DrawScreenResolution(); |