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 "channelgroups.h"
#include "channeljump.h" #include "channeljump.h"
cChannelJump::cChannelJump(cChannelGroups *channelGroups) { cChannelJump::cChannelJump(cChannelGroups *channelGroups, int lastValidChannel) {
this->channelGroups = channelGroups; this->channelGroups = channelGroups;
pixmapText = NULL; pixmapText = NULL;
channel = 0; channel = 0;
maxChannels = channelGroups->GetLastValidChannel(); maxChannels = lastValidChannel;
timeout = Setup.ChannelEntryTimeout; timeout = Setup.ChannelEntryTimeout;
startTime = cTimeMs::Now(); startTime = 0;
SetPixmaps(); SetPixmaps();
Draw(); Draw();
} }

View File

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

View File

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

View File

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