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);
|
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) {
|
void cRecManager::DeleteTimer(const cEvent *event) {
|
||||||
if (!event)
|
if (!event)
|
||||||
return;
|
return;
|
||||||
|
@ -34,7 +34,6 @@ public:
|
|||||||
cTimer *createRemoteTimer(const cEvent *event, std::string path);
|
cTimer *createRemoteTimer(const cEvent *event, std::string path);
|
||||||
void SetTimerPath(cTimer *timer, const cEvent *event, std::string path);
|
void SetTimerPath(cTimer *timer, const cEvent *event, std::string path);
|
||||||
void DeleteTimer(const cTimer *timer);
|
void DeleteTimer(const cTimer *timer);
|
||||||
void DeleteTimer(int timerID);
|
|
||||||
void DeleteTimer(const cEvent *event);
|
void DeleteTimer(const cEvent *event);
|
||||||
void DeleteLocalTimer(const cEvent *event);
|
void DeleteLocalTimer(const cEvent *event);
|
||||||
void DeleteRemoteTimer(const cEvent *event);
|
void DeleteRemoteTimer(const cEvent *event);
|
||||||
|
@ -234,7 +234,7 @@ eOSState cRecMenuView::StateMachine(eRecMenuState nextState) {
|
|||||||
LOCK_TIMERS_READ;
|
LOCK_TIMERS_READ;
|
||||||
const cTimer *t = Timers->Get(timerID);
|
const cTimer *t = Timers->Get(timerID);
|
||||||
#else
|
#else
|
||||||
cTimer *t = Timers.Get(timerID);
|
const cTimer *t = Timers.Get(timerID);
|
||||||
#endif
|
#endif
|
||||||
if (t) {
|
if (t) {
|
||||||
const cEvent *ev = t->Event();
|
const cEvent *ev = t->Event();
|
||||||
@ -251,10 +251,19 @@ eOSState cRecMenuView::StateMachine(eRecMenuState nextState) {
|
|||||||
timerIndex = menu->GetTimerConflictIndex();
|
timerIndex = menu->GetTimerConflictIndex();
|
||||||
} else break;
|
} else break;
|
||||||
int timerID = timerConflicts->GetCurrentConflictTimerID(timerIndex);
|
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;
|
delete activeMenu;
|
||||||
if (!DisplayTimerConflict(timerID)) {
|
if (!DisplayTimerConflict(timerID)) {
|
||||||
activeMenu = new cRecMenuConfirmTimer(event);
|
activeMenu = new cRecMenuConfirmTimer(timers->Get(timerID)->Event());
|
||||||
activeMenu->Display();
|
activeMenu->Display();
|
||||||
}
|
}
|
||||||
break; }
|
break; }
|
||||||
|
Loading…
Reference in New Issue
Block a user