summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2000-10-08 15:08:26 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2000-10-08 15:08:26 +0200
commit9faf7a51e5d67f06e035705cb6e7420c59724341 (patch)
treefccc7cb90c3222b2fa2495a63426aed5b5e9f504
parenta1a52fe11f95e2a3a182cc374ddc62c52d1dabd3 (diff)
downloadvdr-9faf7a51e5d67f06e035705cb6e7420c59724341.tar.gz
vdr-9faf7a51e5d67f06e035705cb6e7420c59724341.tar.bz2
Pressing 'Back' in replay mode brings up 'Recordings' menu
-rw-r--r--CONTRIBUTORS1
-rw-r--r--HISTORY5
-rw-r--r--MANUAL5
-rw-r--r--menu.c25
-rw-r--r--menu.h15
-rw-r--r--vdr.c7
6 files changed, 41 insertions, 17 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index b4999450..b42cb267 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -7,6 +7,7 @@ Carsten Koch <Carsten.Koch@icem.de>
for adding the 'epg2timers' tool (see Tools/epg2timers)
for his idea of using multiple disks (and for testing this feature)
for implementing the 'new recording' indicator
+ for suggesting that the "Back" button in replay mode should bring up the "Recordings" menu
Plamen Ganev <pganev@com-it.net>
for fixing the frequency offset for Hotbird channels
diff --git a/HISTORY b/HISTORY
index 5aa4e4c0..52c37e17 100644
--- a/HISTORY
+++ b/HISTORY
@@ -233,3 +233,8 @@ Video Disk Recorder Revision History
releasing the key stops it.
- The '@' character that marks an "instant recording" can now be turned off
in the "Setup" menu (thanks to Matthias Schniedermeyer).
+- Pressing the "Back" button while replaying now stops replaying and brings up
+ the "Recordings" menu (suggested by Carsten Koch). This can be used to easily
+ delete a recording after watching it, or to switch to a different recording.
+- The "Recordings" menu now places the cursor on the last replayed recording, if
+ that file still exists.
diff --git a/MANUAL b/MANUAL
index bbf73c9a..60f0bb11 100644
--- a/MANUAL
+++ b/MANUAL
@@ -16,7 +16,7 @@ Video Disk Recorder User's Manual
Right Next group - - Enable Increment - Search forward
Ok Ch display Select Switch Edit Accept Play Progress disp.
Menu Menu on Menu off Menu off Menu off Menu off Menu off Menu on
- Back - Menu off Main menu Main menu Discard Main menu -
+ Back - Menu off Main menu Main menu Discard Main menu Recordings menu
Red - Record Edit Edit - Play -
Green - - New New - - Skip -60s
Yellow - - Delete Delete - Delete Skip +60s
@@ -128,6 +128,9 @@ Video Disk Recorder User's Manual
time and title of the recording, a progress bar and the
current and total time of the recording.
Press "Ok" again to turn off the progress display.
+ - Back Stops replaying and brings up the "Recordings" menu. This can be
+ used to easily delete a recording after watching it, or to switch
+ to a different recording.
* Programming the Timer
diff --git a/menu.c b/menu.c
index 024349ac..d1cfb8b1 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.33 2000/10/08 12:44:00 kls Exp $
+ * $Id: menu.c 1.34 2000/10/08 14:50:42 kls Exp $
*/
#include "menu.h"
@@ -13,7 +13,6 @@
#include <stdio.h>
#include <string.h>
#include "config.h"
-#include "recording.h"
#define MENUTIMEOUT 120 // seconds
@@ -996,28 +995,19 @@ void cMenuRecordingItem::Set(void)
// --- cMenuRecordings -------------------------------------------------------
-class cMenuRecordings : public cOsdMenu {
-private:
- cRecordings Recordings;
- eOSState Play(void);
- eOSState Del(void);
- eOSState Summary(void);
-public:
- cMenuRecordings(void);
- virtual eOSState ProcessKey(eKeys Key);
- };
-
cMenuRecordings::cMenuRecordings(void)
:cOsdMenu("Recordings", 6, 6)
{
if (Recordings.Load()) {
+ const char *lastReplayed = cReplayControl::LastReplayed();
cRecording *recording = Recordings.First();
while (recording) {
- Add(new cMenuRecordingItem(recording));
+ Add(new cMenuRecordingItem(recording), lastReplayed && strcmp(lastReplayed, recording->FileName()) == 0);
recording = Recordings.Next(recording);
}
}
SetHelp("Play", NULL/*XXX"Resume"*/, "Delete", "Summary");
+ Display();
}
eOSState cMenuRecordings::Play(void)
@@ -1071,6 +1061,7 @@ eOSState cMenuRecordings::ProcessKey(eKeys Key)
case kRed: return Play();
case kYellow: return Del();
case kBlue: return Summary();
+ case kMenu: return osEnd;
default: break;
}
}
@@ -1364,6 +1355,11 @@ void cReplayControl::SetRecording(const char *FileName, const char *Title)
title = Title ? strdup(Title) : NULL;
}
+const char *cReplayControl::LastReplayed(void)
+{
+ return fileName;
+}
+
void cReplayControl::Show(void)
{
if (!visible) {
@@ -1404,6 +1400,7 @@ eOSState cReplayControl::ProcessKey(eKeys Key)
case kYellow: dvbApi->Skip(60); break;
case kMenu: Hide(); return osMenu; // allow direct switching to menu
case kOk: visible ? Hide() : Show(); break;
+ case kBack: return osRecordings;
default: return osUnknown;
}
return osContinue;
diff --git a/menu.h b/menu.h
index 8b4f82ef..b6d5ade1 100644
--- a/menu.h
+++ b/menu.h
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: menu.h 1.10 2000/09/10 14:42:20 kls Exp $
+ * $Id: menu.h 1.11 2000/10/08 14:36:23 kls Exp $
*/
#ifndef _MENU_H
@@ -14,6 +14,7 @@
#include "dvbapi.h"
#include "osd.h"
+#include "recording.h"
class cMenuMain : public cOsdMenu {
private:
@@ -34,6 +35,17 @@ public:
virtual eOSState ProcessKey(eKeys Key);
};
+class cMenuRecordings : public cOsdMenu {
+private:
+ cRecordings Recordings;
+ eOSState Play(void);
+ eOSState Del(void);
+ eOSState Summary(void);
+public:
+ cMenuRecordings(void);
+ virtual eOSState ProcessKey(eKeys Key);
+ };
+
class cRecordControl {
private:
cDvbApi *dvbApi;
@@ -72,6 +84,7 @@ public:
virtual eOSState ProcessKey(eKeys Key);
bool Visible(void) { return visible; }
static void SetRecording(const char *FileName, const char *Title);
+ static const char *LastReplayed(void);
};
#endif //_MENU_H
diff --git a/vdr.c b/vdr.c
index d527270e..c8cabb0b 100644
--- a/vdr.c
+++ b/vdr.c
@@ -22,7 +22,7 @@
*
* The project's page is at http://www.cadsoft.de/people/kls/vdr
*
- * $Id: vdr.c 1.38 2000/10/08 12:24:30 kls Exp $
+ * $Id: vdr.c 1.39 2000/10/08 14:49:25 kls Exp $
*/
#include <getopt.h>
@@ -228,6 +228,11 @@ int main(int argc, char *argv[])
if (!cRecordControls::Start())
Interface->Error("No free DVB device to record!");
break;
+ case osRecordings:
+ DELETENULL(Menu);
+ DELETENULL(ReplayControl);
+ Menu = new cMenuRecordings;
+ break;
case osReplay: DELETENULL(Menu);
DELETENULL(ReplayControl);
ReplayControl = new cReplayControl;