diff options
author | kamel5 <kamel5 (at) gmx (dot) net> | 2018-03-08 13:02:38 +0100 |
---|---|---|
committer | kamel5 <vdr.kamel5 (at) gmx (dot) net> | 2019-01-27 11:29:38 +0100 |
commit | cbc6f442648a0aea4b94d81176f044c642a7d2b0 (patch) | |
tree | 3bfdc0baebcbaec7845edcc521b4041e6a25035c /recmenuitem.c | |
parent | 8287bb5f7deef757f38b3e2a4ed5a08a57881f7e (diff) | |
download | vdr-plugin-tvguide-cbc6f442648a0aea4b94d81176f044c642a7d2b0.tar.gz vdr-plugin-tvguide-cbc6f442648a0aea4b94d81176f044c642a7d2b0.tar.bz2 |
Compile under VDR 2.3.1
Diffstat (limited to 'recmenuitem.c')
-rw-r--r-- | recmenuitem.c | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/recmenuitem.c b/recmenuitem.c index 6e4d31f..c45a317 100644 --- a/recmenuitem.c +++ b/recmenuitem.c @@ -1817,7 +1817,12 @@ void cRecMenuItemEvent::Draw(void) { if (!event) return; int logoX = DrawIcons(); +#if defined (APIVERSNUM) && (APIVERSNUM >= 20301) + LOCK_CHANNELS_READ; + const cChannel *channel = Channels->GetByChannelID(event->ChannelID()); +#else const cChannel *channel = Channels.GetByChannelID(event->ChannelID()); +#endif cString channelName = ""; if (channel) channelName = channel->Name(); @@ -1913,7 +1918,11 @@ eRecMenuState cRecMenuItemEvent::ProcessKey(eKeys Key) { // --- cRecMenuItemChannelChooser ------------------------------------------------------- cRecMenuItemChannelChooser::cRecMenuItemChannelChooser(cString text, +#if defined (APIVERSNUM) && (APIVERSNUM >= 20301) + const cChannel *initialChannel, +#else cChannel *initialChannel, +#endif bool active, int *callback, eRecMenuState action) { @@ -1998,15 +2007,29 @@ eRecMenuState cRecMenuItemChannelChooser::ProcessKey(eKeys Key) { fresh = true; if (!channel) return rmsConsumed; +#if defined (APIVERSNUM) && (APIVERSNUM >= 20301) + const cChannel *prev = channel; + LOCK_CHANNELS_READ; + const cChannel *firstChannel = Channels->First(); +#else cChannel *prev = channel; cChannel *firstChannel = Channels.First(); +#endif if(firstChannel->GroupSep()) +#if defined (APIVERSNUM) && (APIVERSNUM >= 20301) + firstChannel = Channels->Next(firstChannel); +#else firstChannel = Channels.Next(firstChannel); +#endif if (prev == firstChannel) { if (!initialChannelSet) channel = NULL; } else { +#if defined (APIVERSNUM) && (APIVERSNUM >= 20301) + while (prev = Channels->Prev(prev)) { +#else while (prev = Channels.Prev(prev)) { +#endif if(!prev->GroupSep()) { channel = prev; break; @@ -2023,14 +2046,30 @@ eRecMenuState cRecMenuItemChannelChooser::ProcessKey(eKeys Key) { return rmsConsumed; break; } case kRight: { +#if defined (APIVERSNUM) && (APIVERSNUM >= 20301) + LOCK_CHANNELS_READ; +#endif fresh = true; if (!channel) { +#if defined (APIVERSNUM) && (APIVERSNUM >= 20301) + channel = Channels->First(); +#else channel = Channels.First(); +#endif if(channel->GroupSep()) +#if defined (APIVERSNUM) && (APIVERSNUM >= 20301) + channel = Channels->Next(channel); +#else channel = Channels.Next(channel); +#endif } else { +#if defined (APIVERSNUM) && (APIVERSNUM >= 20301) + const cChannel *next = channel; + while (next = Channels->Next(next)) { +#else cChannel *next = channel; while (next = Channels.Next(next)) { +#endif if(!next->GroupSep()) { channel = next; break; @@ -2052,7 +2091,12 @@ eRecMenuState cRecMenuItemChannelChooser::ProcessKey(eKeys Key) { fresh = false; } channelNumber = channelNumber * 10 + (Key - k0); +#if defined (APIVERSNUM) && (APIVERSNUM >= 20301) + LOCK_CHANNELS_READ; + const cChannel *chanNew = Channels->GetByNumber(channelNumber); +#else cChannel *chanNew = Channels.GetByNumber(channelNumber); +#endif if (chanNew) { channel = chanNew; DrawValue(); @@ -2214,7 +2258,11 @@ eRecMenuState cRecMenuItemDayChooser::ProcessKey(eKeys Key) { } // --- cRecMenuItemRecording ------------------------------------------------------- +#if defined (APIVERSNUM) && (APIVERSNUM >= 20301) +cRecMenuItemRecording::cRecMenuItemRecording(const cRecording *recording, bool active) { +#else cRecMenuItemRecording::cRecMenuItemRecording(cRecording *recording, bool active) { +#endif selectable = true; this->recording = recording; this->active = active; @@ -2242,7 +2290,12 @@ void cRecMenuItemRecording::Draw(void) { if (!recording) return; const cRecordingInfo *recInfo = recording->Info(); +#if defined (APIVERSNUM) && (APIVERSNUM >= 20301) + LOCK_CHANNELS_READ; + const cChannel *channel = Channels->GetByChannelID(recInfo->ChannelID()); +#else cChannel *channel = Channels.GetByChannelID(recInfo->ChannelID()); +#endif cString channelName = tr("unknown channel"); if (channel) channelName = channel->Name(); @@ -2457,7 +2510,11 @@ void cRecMenuItemTimelineHeader::Show(void) { // --- cRecMenuItemTimelineTimer ------------------------------------------------------- +#if defined (APIVERSNUM) && (APIVERSNUM >= 20301) +cRecMenuItemTimelineTimer::cRecMenuItemTimelineTimer(const cTimer *timer, time_t start, time_t stop, std::vector<cTVGuideTimerConflict*> conflictsToday, cRecMenuItemTimelineHeader *header, bool active) { +#else cRecMenuItemTimelineTimer::cRecMenuItemTimelineTimer(cTimer *timer, time_t start, time_t stop, std::vector<cTVGuideTimerConflict*> conflictsToday, cRecMenuItemTimelineHeader *header, bool active) { +#endif conflicts = conflictsToday; defaultBackground = false; pixmapBack = NULL; @@ -2604,7 +2661,11 @@ void cRecMenuItemTimelineTimer::Show(void) { if (pixmapTimerConflicts) pixmapTimerConflicts->SetLayer(6); } +#if defined (APIVERSNUM) && (APIVERSNUM >= 20301) +const cTimer *cRecMenuItemTimelineTimer::GetTimerValue(void) { +#else cTimer *cRecMenuItemTimelineTimer::GetTimerValue(void) { +#endif return timer; } |