Refactor cRecMenuTimerConflict

This commit is contained in:
kamel5 2019-11-09 11:55:25 +01:00
parent 73e331f97f
commit 33196207d0

View File

@ -234,16 +234,18 @@ int cRecMenuTimerConflicts::GetTimerConflict(void) {
}
// --- cRecMenuTimerConflict ---------------------------------------------------------
cRecMenuTimerConflict::cRecMenuTimerConflict(cTVGuideTimerConflict *conflict, eRecMenuState nextAction) {
SetWidthPercent(95);
cRecMenuTimerConflict::cRecMenuTimerConflict(cTVGuideTimerConflict *conflict, eRecMenuState nextAction) { //OK
SetWidthPercent(90);
this->conflict = conflict;
totalNumMenuItems = (int)conflict->timerIDs.size();
SetHeader(new cRecMenuItemTimerConflictHeader(conflict->timeStart,
AddHeader(new cRecMenuItemTimerConflictHeader(conflict->timeStart,
conflict->timeStop,
conflict->overlapStart,
conflict->overlapStop));
SetFooter(new cRecMenuItemButton(tr("Ignore Conflict"), nextAction, false, true));
AddFooter(new cRecMenuItemButton(tr("Ignore Conflict"), nextAction, false, true));
int i = 0;
for(std::vector<int>::iterator it = conflict->timerIDs.begin(); it != conflict->timerIDs.end(); it++) {
#if VDRVERSNUM >= 20301
@ -262,12 +264,12 @@ cRecMenuTimerConflict::cRecMenuTimerConflict(cTVGuideTimerConflict *conflict, eR
conflict->timeStop,
conflict->overlapStart,
conflict->overlapStop,
(!i)?true:false)
))
(!i) ? true : false)))
break;
i++;
}
}
CalculateHeight();
CreatePixmap();
Arrange();