summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xpo/de_DE.po2
-rw-r--r--recmenu.c9
-rw-r--r--recmenu.h1
-rw-r--r--recmenuitem.c6
-rw-r--r--recmenuitem.h7
-rw-r--r--recmenumanager.c38
-rw-r--r--recmenus.c7
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"
diff --git a/recmenu.c b/recmenu.c
index 728db1e..0dc1606 100644
--- a/recmenu.c
+++ b/recmenu.c
@@ -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;
diff --git a/recmenu.h b/recmenu.h
index 9788aac..8613780 100644
--- a/recmenu.h
+++ b/recmenu.h
@@ -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 ---------------------------------
*/
diff --git a/recmenus.c b/recmenus.c
index 2d22f2c..5223ffc 100644
--- a/recmenus.c
+++ b/recmenus.c
@@ -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();