summaryrefslogtreecommitdiff
path: root/menu_event.c
diff options
context:
space:
mode:
Diffstat (limited to 'menu_event.c')
-rw-r--r--menu_event.c28
1 files changed, 23 insertions, 5 deletions
diff --git a/menu_event.c b/menu_event.c
index 77a03a6..7c29114 100644
--- a/menu_event.c
+++ b/menu_event.c
@@ -84,7 +84,13 @@ void cMenuEventSearch::Set()
if (event)
{
- cChannel *channel = Channels.GetByChannelID(event->ChannelID(), true, true);
+#if VDRVERSNUM > 20300
+ LOCK_CHANNELS_READ;
+ const cChannels *vdrchannels = Channels;
+#else
+ cChannels *vdrchannels = &Channels;
+#endif
+ const cChannel *channel = vdrchannels->GetByChannelID(event->ChannelID(), true, true);
bool canSwitch = false;
if (channel)
{
@@ -96,7 +102,13 @@ void cMenuEventSearch::Set()
cEventObj* eventObjNext = GetNext(event);
eTimerMatch timerMatch = tmNone;
- Timers.GetMatch(event, &timerMatch);
+#if VDRVERSNUM > 20300
+ LOCK_TIMERS_READ;
+ const cTimers *vdrtimers = Timers;
+#else
+ cTimers *vdrtimers = &Timers;
+#endif
+ vdrtimers->GetMatch(event, &timerMatch);
const char* szRed = trVDR("Button$Record");
if (timerMatch == tmFull)
szRed = trVDR("Button$Timer");
@@ -112,9 +124,9 @@ void cMenuEventSearch::Set()
else if (surfMode == SurfModeChannel)
{
if (eventObjPrev && eventObjPrev->Event())
- szGreen = strdup(CHANNELNAME(Channels.GetByChannelID(eventObjPrev->Event()->ChannelID(), true, true)));
+ szGreen = strdup(CHANNELNAME(vdrchannels->GetByChannelID(eventObjPrev->Event()->ChannelID(), true, true)));
if (eventObjNext && eventObjNext->Event())
- szYellow = strdup(CHANNELNAME(Channels.GetByChannelID(eventObjNext->Event()->ChannelID(), true, true)));
+ szYellow = strdup(CHANNELNAME(vdrchannels->GetByChannelID(eventObjNext->Event()->ChannelID(), true, true)));
SetHelp(szRed, szGreen, szYellow, canSwitch ? trVDR("Button$Switch") : NULL);
}
}
@@ -236,7 +248,13 @@ void cMenuEventSearchSimple::Set()
if (event)
{
- cChannel *channel = Channels.GetByChannelID(event->ChannelID(), true, true);
+#if VDRVERSNUM > 20300
+ LOCK_CHANNELS_READ;
+ const cChannels *vdrchannels = Channels;
+#else
+ cChannels *vdrchannels = &Channels;
+#endif
+ const cChannel *channel = vdrchannels->GetByChannelID(event->ChannelID(), true, true);
if (channel)
{
SetTitle(channel->Name());