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

Showing progress display when setting editing mark

This commit is contained in:
Klaus Schmidinger 2001-07-28 14:06:36 +02:00
parent dd3c8591cd
commit 6585e5ede6
3 changed files with 23 additions and 7 deletions

View File

@ -593,3 +593,6 @@ Video Disk Recorder Revision History
to Guido Fiala).
- When entering time values the digits that still have to be entered are now
shown as '-' (as in "1-:--").
- When setting an editing mark while the progress display is not active, the
display will now be turned on for a short while to indicate the successful
setting of the mark.

20
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.86 2001/07/28 13:44:48 kls Exp $
* $Id: menu.c 1.87 2001/07/28 14:03:39 kls Exp $
*/
#include "menu.h"
@ -2150,6 +2150,7 @@ cReplayControl::cReplayControl(void)
dvbApi = cDvbApi::PrimaryDvbApi;
visible = shown = displayFrames = false;
lastCurrent = lastTotal = -1;
timeoutShow = 0;
if (fileName) {
marks.Load(fileName);
dvbApi->StartReplay(fileName);
@ -2183,12 +2184,15 @@ void cReplayControl::ClearLastReplayed(const char *FileName)
}
}
void cReplayControl::Show(void)
void cReplayControl::Show(int Seconds)
{
if (!visible) {
Interface->Open(Setup.OSDwidth, -3);
needsFastResponse = visible = true;
shown = ShowProgress(true);
if (Seconds > 0) {
timeoutShow = time(NULL) + Seconds;
}
}
}
@ -2241,8 +2245,10 @@ void cReplayControl::MarkToggle(void)
cMark *m = marks.Get(Current);
if (m)
marks.Del(m);
else
else {
marks.Add(Current);
Show(2);
}
marks.Save();
}
}
@ -2318,8 +2324,14 @@ eOSState cReplayControl::ProcessKey(eKeys Key)
{
if (!dvbApi->Replaying())
return osEnd;
if (visible)
if (visible) {
if (timeoutShow && time(NULL) > timeoutShow) {
Hide();
timeoutShow = 0;
}
else
shown = ShowProgress(!shown) || shown;
}
bool DisplayedFrames = displayFrames;
displayFrames = false;
switch (Key) {

5
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.19 2001/07/28 13:03:39 kls Exp $
* $Id: menu.h 1.20 2001/07/28 13:59:29 kls Exp $
*/
#ifndef _MENU_H
@ -84,7 +84,8 @@ private:
cMarks marks;
bool visible, shown, displayFrames;
int lastCurrent, lastTotal;
void Show(void);
time_t timeoutShow;
void Show(int Seconds = 0);
void Hide(void);
static char *fileName;
static char *title;