1
0
mirror of https://github.com/VDR4Arch/vdr.git synced 2023-10-10 13:36:52 +02:00

Pressing 'Back' in replay mode brings up 'Recordings' menu

This commit is contained in:
Klaus Schmidinger 2000-10-08 15:08:26 +02:00
parent a1a52fe11f
commit 9faf7a51e5
6 changed files with 41 additions and 17 deletions

View File

@ -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

View File

@ -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.

5
MANUAL
View File

@ -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

25
menu.c
View File

@ -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;

15
menu.h
View File

@ -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

7
vdr.c
View File

@ -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;