lastValidChannel

This commit is contained in:
kamel5 2019-07-11 14:14:51 +02:00
parent 45a2d6bee0
commit 107f3f945f
4 changed files with 11 additions and 5 deletions

View File

@ -6,13 +6,13 @@
#include "channelgroups.h"
#include "channeljump.h"
cChannelJump::cChannelJump(cChannelGroups *channelGroups) {
cChannelJump::cChannelJump(cChannelGroups *channelGroups, int lastValidChannel) {
this->channelGroups = channelGroups;
pixmapText = NULL;
channel = 0;
maxChannels = channelGroups->GetLastValidChannel();
maxChannels = lastValidChannel;
timeout = Setup.ChannelEntryTimeout;
startTime = cTimeMs::Now();
startTime = 0;
SetPixmaps();
Draw();
}

View File

@ -18,7 +18,7 @@ private:
void Draw(void);
cString BuildChannelString(void);
public:
cChannelJump(cChannelGroups *channelGroups);
cChannelJump(cChannelGroups *channelGroups, int lastValidChannel);
virtual ~cChannelJump(void);
void Set(int num);
void DrawText(void);

View File

@ -672,9 +672,14 @@ void cTvGuideOsd::TimeJump(int mode) {
osdManager.flush();
}
int cTvGuideOsd::GetLastValidChannel(void) {
return channelGroups->GetLastValidChannel();
}
void cTvGuideOsd::ChannelJump(int num) {
if (!channelJumper) {
channelJumper = new cChannelJump(channelGroups);
int lastValidChannel = GetLastValidChannel();
channelJumper = new cChannelJump(channelGroups, lastValidChannel);
}
channelJumper->Set(num);
channelJumper->DrawText();

View File

@ -26,6 +26,7 @@ private:
cFooter *footer;
cRecMenuView *recMenuView;
cChannelJump *channelJumper;
int GetLastValidChannel(void);
bool detailViewActive;
void drawOsd();
void readChannels(const cChannel *channelStart);