From 6585e5ede60d1eaeeb57fda815c1cb4803c2d67b Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Sat, 28 Jul 2001 14:06:36 +0200 Subject: Showing progress display when setting editing mark --- HISTORY | 3 +++ menu.c | 22 +++++++++++++++++----- menu.h | 5 +++-- 3 files changed, 23 insertions(+), 7 deletions(-) diff --git a/HISTORY b/HISTORY index 23b4a004..28ac118d 100644 --- a/HISTORY +++ b/HISTORY @@ -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. diff --git a/menu.c b/menu.c index ba681ee4..6116167f 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.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) - shown = ShowProgress(!shown) || shown; + if (visible) { + if (timeoutShow && time(NULL) > timeoutShow) { + Hide(); + timeoutShow = 0; + } + else + shown = ShowProgress(!shown) || shown; + } bool DisplayedFrames = displayFrames; displayFrames = false; switch (Key) { diff --git a/menu.h b/menu.h index c87ecced..adc10b72 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.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; -- cgit v1.2.3