summaryrefslogtreecommitdiff
path: root/menu.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2000-10-08 15:41:30 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2000-10-08 15:41:30 +0200
commit724a596cf2daa86fddc5cd42b2d8122de5d76ca9 (patch)
treed1a877de4a77d4acb90b11e2ddade31e3b4e2056 /menu.c
parent9faf7a51e5d67f06e035705cb6e7420c59724341 (diff)
downloadvdr-724a596cf2daa86fddc5cd42b2d8122de5d76ca9.tar.gz
vdr-724a596cf2daa86fddc5cd42b2d8122de5d76ca9.tar.bz2
'Blue' button in main menu has 'Resume'
Diffstat (limited to 'menu.c')
-rw-r--r--menu.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/menu.c b/menu.c
index d1cfb8b1..ddf95417 100644
--- a/menu.c
+++ b/menu.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: menu.c 1.34 2000/10/08 14:50:42 kls Exp $
+ * $Id: menu.c 1.35 2000/10/08 15:34:26 kls Exp $
*/
#include "menu.h"
@@ -1006,7 +1006,7 @@ cMenuRecordings::cMenuRecordings(void)
recording = Recordings.Next(recording);
}
}
- SetHelp("Play", NULL/*XXX"Resume"*/, "Delete", "Summary");
+ SetHelp("Play", NULL, "Delete", "Summary");
Display();
}
@@ -1028,6 +1028,7 @@ eOSState cMenuRecordings::Del(void)
//XXX if (!ti->recording) {
if (Interface->Confirm("Delete Recording?")) {
if (ri->recording->Delete()) {
+ cReplayControl::ClearLastReplayed(ri->recording->FileName());
cOsdMenu::Del(Current());
Display();
}
@@ -1124,7 +1125,7 @@ cMenuMain::cMenuMain(bool Replaying)
Add(new cOsdItem(buffer, osStopRecord));
delete buffer;
}
- SetHelp("Record");
+ SetHelp("Record", NULL, NULL, cReplayControl::LastReplayed() ? "Resume" : NULL);
Display();
lastActivity = time(NULL);
}
@@ -1150,6 +1151,9 @@ eOSState cMenuMain::ProcessKey(eKeys Key)
case kRed: if (!HasSubMenu())
state = osRecord;
break;
+ case kBlue: if (!HasSubMenu())
+ state = osReplay;
+ break;
default: break;
}
}
@@ -1360,6 +1364,14 @@ const char *cReplayControl::LastReplayed(void)
return fileName;
}
+void cReplayControl::ClearLastReplayed(const char *FileName)
+{
+ if (fileName && FileName && strcmp(fileName, FileName) == 0) {
+ delete fileName;
+ fileName = NULL;
+ }
+}
+
void cReplayControl::Show(void)
{
if (!visible) {