Some changes for VDR < 2.3.0

This commit is contained in:
kamel5 2019-04-06 18:34:31 +02:00
parent 6f7042d41f
commit 52d887d854
2 changed files with 5 additions and 17 deletions

View File

@ -1919,11 +1919,7 @@ eRecMenuState cRecMenuItemEvent::ProcessKey(eKeys Key) {
// --- cRecMenuItemChannelChooser ------------------------------------------------------- // --- cRecMenuItemChannelChooser -------------------------------------------------------
cRecMenuItemChannelChooser::cRecMenuItemChannelChooser(cString text, cRecMenuItemChannelChooser::cRecMenuItemChannelChooser(cString text,
#if VDRVERSNUM >= 20301
const cChannel *initialChannel, const cChannel *initialChannel,
#else
cChannel *initialChannel,
#endif
bool active, bool active,
int *callback, int *callback,
eRecMenuState action) { eRecMenuState action) {
@ -2013,8 +2009,8 @@ eRecMenuState cRecMenuItemChannelChooser::ProcessKey(eKeys Key) {
LOCK_CHANNELS_READ; LOCK_CHANNELS_READ;
const cChannel *firstChannel = Channels->First(); const cChannel *firstChannel = Channels->First();
#else #else
cChannel *prev = channel; const cChannel *prev = channel;
cChannel *firstChannel = Channels.First(); const cChannel *firstChannel = Channels.First();
#endif #endif
if(firstChannel->GroupSep()) if(firstChannel->GroupSep())
#if VDRVERSNUM >= 20301 #if VDRVERSNUM >= 20301
@ -2068,7 +2064,7 @@ eRecMenuState cRecMenuItemChannelChooser::ProcessKey(eKeys Key) {
const cChannel *next = channel; const cChannel *next = channel;
while (next = Channels->Next(next)) { while (next = Channels->Next(next)) {
#else #else
cChannel *next = channel; const cChannel *next = channel;
while (next = Channels.Next(next)) { while (next = Channels.Next(next)) {
#endif #endif
if(!next->GroupSep()) { if(!next->GroupSep()) {
@ -2096,7 +2092,7 @@ eRecMenuState cRecMenuItemChannelChooser::ProcessKey(eKeys Key) {
LOCK_CHANNELS_READ; LOCK_CHANNELS_READ;
const cChannel *chanNew = Channels->GetByNumber(channelNumber); const cChannel *chanNew = Channels->GetByNumber(channelNumber);
#else #else
cChannel *chanNew = Channels.GetByNumber(channelNumber); const cChannel *chanNew = Channels.GetByNumber(channelNumber);
#endif #endif
if (chanNew) { if (chanNew) {
channel = chanNew; channel = chanNew;
@ -2291,7 +2287,7 @@ void cRecMenuItemRecording::Draw(void) {
LOCK_CHANNELS_READ; LOCK_CHANNELS_READ;
const cChannel *channel = Channels->GetByChannelID(recInfo->ChannelID()); const cChannel *channel = Channels->GetByChannelID(recInfo->ChannelID());
#else #else
cChannel *channel = Channels.GetByChannelID(recInfo->ChannelID()); const cChannel *channel = Channels.GetByChannelID(recInfo->ChannelID());
#endif #endif
cString channelName = tr("unknown channel"); cString channelName = tr("unknown channel");
if (channel) if (channel)

View File

@ -489,11 +489,7 @@ public:
class cRecMenuItemChannelChooser : public cRecMenuItem { class cRecMenuItemChannelChooser : public cRecMenuItem {
private: private:
cString text; cString text;
#if VDRVERSNUM >= 20301
const cChannel *channel; const cChannel *channel;
#else
cChannel *channel;
#endif
int channelNumber; int channelNumber;
int *callback; int *callback;
bool initialChannelSet; bool initialChannelSet;
@ -502,11 +498,7 @@ private:
void DrawValue(void); void DrawValue(void);
public: public:
cRecMenuItemChannelChooser (cString text, cRecMenuItemChannelChooser (cString text,
#if VDRVERSNUM >= 20301
const cChannel *initialChannel, const cChannel *initialChannel,
#else
cChannel *initialChannel,
#endif
bool active = false, bool active = false,
int *callback = NULL, int *callback = NULL,
eRecMenuState action = rmsNotConsumed); eRecMenuState action = rmsNotConsumed);