diff options
-rwxr-xr-x | po/de_DE.po | 2 | ||||
-rw-r--r-- | recmenu.c | 9 | ||||
-rw-r--r-- | recmenu.h | 1 | ||||
-rw-r--r-- | recmenuitem.c | 6 | ||||
-rw-r--r-- | recmenuitem.h | 7 | ||||
-rw-r--r-- | recmenumanager.c | 38 | ||||
-rw-r--r-- | recmenus.c | 7 |
7 files changed, 51 insertions, 19 deletions
diff --git a/po/de_DE.po b/po/de_DE.po index f21f50f..d42fea5 100755 --- a/po/de_DE.po +++ b/po/de_DE.po @@ -79,7 +79,7 @@ msgid "No Timers active" msgstr "Keine Timer aktiv" msgid "Instant Record" -msgstr "Sofortaufnahme" +msgstr "Aufnahme" msgid "Delete Timer" msgstr "Timer löschen" @@ -463,6 +463,15 @@ const cEvent *cRecMenu::GetEventValue(int itemNumber) { return NULL; } +cTimer *cRecMenu::GetTimerValue(int itemNumber) { + cRecMenuItem *item = NULL; + item = menuItems.Get(itemNumber); + if (item) { + return item->GetTimerValue(); + } + return NULL; +} + eRecMenuState cRecMenu::ProcessKey(eKeys Key) { cRecMenuItem *activeItem = GetActiveMenuItem(); eRecMenuState state = rmsContinue; @@ -58,6 +58,7 @@ public: bool GetBoolValue(int itemNumber); cString GetStringValue(int itemNumber); const cEvent *GetEventValue(int itemNumber); + cTimer *GetTimerValue(int itemNumber); virtual eRecMenuState ProcessKey(eKeys Key); }; #endif //__TVGUIDE_RECMENU_H
\ No newline at end of file diff --git a/recmenuitem.c b/recmenuitem.c index 4e3ba9d..a534e62 100644 --- a/recmenuitem.c +++ b/recmenuitem.c @@ -2401,14 +2401,14 @@ void cRecMenuItemTimelineTimer::Show(void) { pixmapTimerConflicts->SetLayer(6); } -const cEvent *cRecMenuItemTimelineTimer::GetEventValue(void) { - return timer->Event(); +cTimer *cRecMenuItemTimelineTimer::GetTimerValue(void) { + return timer; } eRecMenuState cRecMenuItemTimelineTimer::ProcessKey(eKeys Key) { switch (Key & ~k_Repeat) { case kOk: - return rmsTimelineInfo; + return rmsTimelineTimerEdit; default: break; } diff --git a/recmenuitem.h b/recmenuitem.h index b0d1db9..8612939 100644 --- a/recmenuitem.h +++ b/recmenuitem.h @@ -56,7 +56,9 @@ enum eRecMenuState { rmsTimerConflictIgnoreReruns, rmsTimerConflictRecordRerun, rmsTimeline, - rmsTimelineInfo, + rmsTimelineTimerEdit, + rmsTimelineTimerSave, + rmsTimelineTimerDelete, rmsDisabled, }; @@ -99,6 +101,7 @@ public: virtual bool GetBoolValue(void) { return false; }; virtual cString GetStringValue(void) { return cString(""); }; virtual const cEvent *GetEventValue(void) { return NULL; }; + virtual cTimer *GetTimerValue(void) { return NULL; }; virtual eRecMenuState ProcessKey(eKeys Key) { return rmsNotConsumed; }; }; @@ -534,7 +537,7 @@ public: void Hide(void); void Show(void); void Draw(void); - const cEvent *GetEventValue(void); + cTimer *GetTimerValue(void); eRecMenuState ProcessKey(eKeys Key); }; diff --git a/recmenumanager.c b/recmenumanager.c index d02db9c..2adaa42 100644 --- a/recmenumanager.c +++ b/recmenumanager.c @@ -536,20 +536,34 @@ eOSState cRecMenuManager::StateMachine(eRecMenuState nextState) { activeMenu = new cRecMenuTimeline(timerConflicts);
activeMenu->Display();
break; }
- case rmsTimelineInfo: {
- const cEvent *ev = activeMenu->GetEventValue(activeMenu->GetActive(true));
- if (ev) {
- activeMenu->Hide();
- detailView = new cDetailView(ev);
- detailView->setContent();
- detailView->drawHeader();
- detailView->drawContent();
- detailView->drawScrollbar();
- detailView->Start();
- detailViewActive = true;
+ case rmsTimelineTimerEdit: {
+ timer = activeMenu->GetTimerValue(activeMenu->GetActive(true));
+ if (timer) {
+ delete activeMenu;
+ activeMenu = new cRecMenuEditTimer(timer, rmsTimelineTimerSave);
+ activeMenu->Display();
}
break;}
-
+ case rmsTimelineTimerSave: {
+ recManager->SaveTimer(timer, activeMenu);
+ delete activeMenu;
+ if (timerConflicts) {
+ delete timerConflicts;
+ }
+ timerConflicts = recManager->CheckTimerConflict();
+ activeMenu = new cRecMenuTimeline(timerConflicts);
+ activeMenu->Display();
+ break; }
+ case rmsTimelineTimerDelete: {
+ recManager->DeleteTimer(timer->Event());
+ delete activeMenu;
+ if (timerConflicts) {
+ delete timerConflicts;
+ }
+ timerConflicts = recManager->CheckTimerConflict();
+ activeMenu = new cRecMenuTimeline(timerConflicts);
+ activeMenu->Display();
+ break; }
/*
* --------- COMMON ---------------------------------
*/
@@ -403,7 +403,12 @@ cRecMenuEditTimer::cRecMenuEditTimer(const cTimer *timer, eRecMenuState nextStat AddMenuItem(new cRecMenuItemDay(tr("Day"), day, false)); AddMenuItem(new cRecMenuItemTime(tr("Timer start time"), start, false)); AddMenuItem(new cRecMenuItemTime(tr("Timer stop time"), stop, false)); - AddMenuItem(new cRecMenuItemButtonYesNo(tr("Save"), tr("Cancel"), nextState, rmsClose, false)); + if (nextState == rmsTimelineTimerSave) { + AddMenuItem(new cRecMenuItemButton(tr("Delete Timer"), rmsTimelineTimerDelete, false, false)); + AddMenuItem(new cRecMenuItemButtonYesNo(tr("Save"), tr("Cancel"), nextState, rmsTimeline, false)); + } else { + AddMenuItem(new cRecMenuItemButtonYesNo(tr("Save"), tr("Cancel"), nextState, rmsClose, false)); + } CalculateHeight(); CreatePixmap(); Arrange(); |