mirror of
https://projects.vdr-developer.org/git/vdr-plugin-tvguide.git
synced 2023-10-05 15:01:48 +02:00
Fixed a error in DeleteTimerConflictMenu
This commit is contained in:
parent
bcf2ce757c
commit
2e4a43133e
15
recmanager.c
15
recmanager.c
@ -175,21 +175,6 @@ void cRecManager::SetTimerPath(cTimer *timer, const cEvent *event, std::string p
|
||||
timer->SetFile(*newFileName);
|
||||
}
|
||||
|
||||
void cRecManager::DeleteTimer(int timerID) {
|
||||
const cTimer *t;
|
||||
#if VDRVERSNUM >= 20301
|
||||
{
|
||||
LOCK_TIMERS_READ;
|
||||
t = Timers->Get(timerID);
|
||||
}
|
||||
#else
|
||||
t = Timers.Get(timerID);
|
||||
#endif
|
||||
if (!t)
|
||||
return;
|
||||
DeleteTimer(t);
|
||||
}
|
||||
|
||||
void cRecManager::DeleteTimer(const cEvent *event) {
|
||||
if (!event)
|
||||
return;
|
||||
|
@ -34,7 +34,6 @@ public:
|
||||
cTimer *createRemoteTimer(const cEvent *event, std::string path);
|
||||
void SetTimerPath(cTimer *timer, const cEvent *event, std::string path);
|
||||
void DeleteTimer(const cTimer *timer);
|
||||
void DeleteTimer(int timerID);
|
||||
void DeleteTimer(const cEvent *event);
|
||||
void DeleteLocalTimer(const cEvent *event);
|
||||
void DeleteRemoteTimer(const cEvent *event);
|
||||
|
@ -234,7 +234,7 @@ eOSState cRecMenuView::StateMachine(eRecMenuState nextState) {
|
||||
LOCK_TIMERS_READ;
|
||||
const cTimer *t = Timers->Get(timerID);
|
||||
#else
|
||||
cTimer *t = Timers.Get(timerID);
|
||||
const cTimer *t = Timers.Get(timerID);
|
||||
#endif
|
||||
if (t) {
|
||||
const cEvent *ev = t->Event();
|
||||
@ -251,10 +251,19 @@ eOSState cRecMenuView::StateMachine(eRecMenuState nextState) {
|
||||
timerIndex = menu->GetTimerConflictIndex();
|
||||
} else break;
|
||||
int timerID = timerConflicts->GetCurrentConflictTimerID(timerIndex);
|
||||
recManager->DeleteTimer(timerID);
|
||||
const cTimers* timers;
|
||||
#if VDRVERSNUM >= 20301
|
||||
{
|
||||
LOCK_TIMERS_READ;
|
||||
timers = Timers;
|
||||
}
|
||||
#else
|
||||
timers = &Timers;
|
||||
#endif
|
||||
recManager->DeleteTimer(timers->Get(timerID)->Event());
|
||||
delete activeMenu;
|
||||
if (!DisplayTimerConflict(timerID)) {
|
||||
activeMenu = new cRecMenuConfirmTimer(event);
|
||||
activeMenu = new cRecMenuConfirmTimer(timers->Get(timerID)->Event());
|
||||
activeMenu->Display();
|
||||
}
|
||||
break; }
|
||||
|
Loading…
Reference in New Issue
Block a user