diff options
author | kamel5 <vdr.kamel5 (at) gmx (dot) net> | 2019-07-11 14:34:31 +0200 |
---|---|---|
committer | kamel5 <vdr.kamel5 (at) gmx (dot) net> | 2019-07-11 14:34:31 +0200 |
commit | 6b3eda282f90ec1bf1dcb556ed0074ea34efcfaf (patch) | |
tree | 76b2d886960165022d1498ac1dc37698c296924b /tvguideosd.c | |
parent | 107f3f945fc72e75fa2979a6011dd8507fa8ac77 (diff) | |
download | vdr-plugin-tvguide-6b3eda282f90ec1bf1dcb556ed0074ea34efcfaf.tar.gz vdr-plugin-tvguide-6b3eda282f90ec1bf1dcb556ed0074ea34efcfaf.tar.bz2 |
Change cMyTime to cTimeManager
Diffstat (limited to 'tvguideosd.c')
-rw-r--r-- | tvguideosd.c | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/tvguideosd.c b/tvguideosd.c index a3f56d4..5a52f16 100644 --- a/tvguideosd.c +++ b/tvguideosd.c @@ -20,7 +20,7 @@ cTvGuideOsd::cTvGuideOsd(void) { } cTvGuideOsd::~cTvGuideOsd() { - delete myTime; + delete timeManager; columns.Clear(); if (config.displayStatusHeader) { delete statusHeader; @@ -52,8 +52,8 @@ void cTvGuideOsd::Show(void) { imgCache.CreateCache(); } osdManager.setBackground(); - myTime = new cMyTime(); - myTime->Now(); + timeManager = new cTimeManager(); + timeManager->Now(); SwitchTimers.Load(AddDirectory(cPlugin::ConfigDirectory("epgsearch"), "epgsearchswitchtimers.conf")); recMenuView = new cRecMenuView(); pRemoteTimers = cPluginManager::CallFirstService("RemoteTimers::RefreshTimers-v1.0", NULL); @@ -111,7 +111,7 @@ void cTvGuideOsd::drawOsd() { statusHeader->Draw(); statusHeader->ScaleVideo(); } - timeLine = new cTimeLine(myTime); + timeLine = new cTimeLine(timeManager); timeLine->drawDateViewer(); timeLine->drawTimeline(); timeLine->drawClock(); @@ -152,7 +152,7 @@ void cTvGuideOsd::readChannels(const cChannel *channelStart) { if (channelGroups->IsInLastGroup(channel)) { break; } - cChannelEpg *column = new cChannelEpg(i, channel, myTime); + cChannelEpg *column = new cChannelEpg(i, channel, timeManager); if (column->readGrids()) { columns.Add(column); i++; @@ -252,7 +252,7 @@ void cTvGuideOsd::channelForward() { if (channelGroups->IsInLastGroup(channelRight)) { break; } - colRight = new cChannelEpg(config.numGrids - 1, channelRight, myTime); + colRight = new cChannelEpg(config.numGrids - 1, channelRight, timeManager); if (colRight->readGrids()) { break; } else { @@ -308,7 +308,7 @@ void cTvGuideOsd::channelBack() { #endif while (channelLeft = channels->Prev(channelLeft)) { if (!channelLeft->GroupSep()) { - colLeft = new cChannelEpg(0, channelLeft, myTime); + colLeft = new cChannelEpg(0, channelLeft, timeManager); if (colLeft->readGrids()) { break; } else { @@ -352,14 +352,14 @@ void cTvGuideOsd::channelBack() { void cTvGuideOsd::timeForward() { bool actionDone = false; - if ( (myTime->GetEnd() - activeGrid->EndTime())/60 < 30 ) { + if ( (timeManager->GetEnd() - activeGrid->EndTime())/60 < 30 ) { ScrollForward(); actionDone = true; } cGrid *next = activeGrid->column->getNext(activeGrid); if (next) { - if ( (next->EndTime() < myTime->GetEnd()) - || ( (myTime->GetEnd() - next->StartTime())/60 > 30 ) ) { + if ( (next->EndTime() < timeManager->GetEnd()) + || ( (timeManager->GetEnd() - next->StartTime())/60 > 30 ) ) { setNextActiveGrid(next); actionDone = true; } @@ -371,7 +371,7 @@ void cTvGuideOsd::timeForward() { } void cTvGuideOsd::ScrollForward() { - myTime->AddStep(config.stepMinutes); + timeManager->AddStep(config.stepMinutes); timeLine->drawDateViewer(); timeLine->drawClock(); timeLine->setTimeline(); @@ -384,14 +384,14 @@ void cTvGuideOsd::ScrollForward() { void cTvGuideOsd::timeBack() { bool actionDone = false; - if ( (activeGrid->StartTime() - myTime->GetStart())/60 < 30 ) { + if ( (activeGrid->StartTime() - timeManager->GetStart())/60 < 30 ) { ScrollBack(); actionDone = true; } cGrid *prev = activeGrid->column->getPrev(activeGrid); if (prev) { - if ( (prev->StartTime() > myTime->GetStart()) - || ( (prev->EndTime() - myTime->GetStart())/60 > 30 ) + if ( (prev->StartTime() > timeManager->GetStart()) + || ( (prev->EndTime() - timeManager->GetStart())/60 > 30 ) || ( prev->isFirst()) ) { setNextActiveGrid(prev); actionDone = true; @@ -404,7 +404,7 @@ void cTvGuideOsd::timeBack() { } void cTvGuideOsd::ScrollBack() { - bool tooFarInPast = myTime->DelStep(config.stepMinutes); + bool tooFarInPast = timeManager->DelStep(config.stepMinutes); if (tooFarInPast) return; timeLine->drawDateViewer(); @@ -628,38 +628,38 @@ void cTvGuideOsd::processNumKey(int numKey) { void cTvGuideOsd::TimeJump(int mode) { switch (mode) { case 1: { - bool tooFarInPast = myTime->DelStep(config.bigStepHours*60); + bool tooFarInPast = timeManager->DelStep(config.bigStepHours*60); if (tooFarInPast) return; } break; case 3: { - myTime->AddStep(config.bigStepHours*60); + timeManager->AddStep(config.bigStepHours*60); } break; case 4: { - bool tooFarInPast = myTime->DelStep(config.hugeStepHours*60); + bool tooFarInPast = timeManager->DelStep(config.hugeStepHours*60); if (tooFarInPast) return; } break; case 6: { - myTime->AddStep(config.hugeStepHours*60); + timeManager->AddStep(config.hugeStepHours*60); } break; case 7: { - cMyTime primeChecker; + cTimeManager primeChecker; primeChecker.Now(); - time_t prevPrime = primeChecker.getPrevPrimetime(myTime->GetStart()); + time_t prevPrime = primeChecker.getPrevPrimetime(timeManager->GetStart()); if (primeChecker.tooFarInPast(prevPrime)) return; - myTime->SetTime(prevPrime); + timeManager->SetTime(prevPrime); } break; case 9: { - cMyTime primeChecker; - time_t nextPrime = primeChecker.getNextPrimetime(myTime->GetStart()); - myTime->SetTime(nextPrime); + cTimeManager primeChecker; + time_t nextPrime = primeChecker.getNextPrimetime(timeManager->GetStart()); + timeManager->SetTime(nextPrime); } break; default: |