summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2003-06-19 10:06:07 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2003-06-19 10:06:07 +0200
commit1922b1401048262b1f6a931ebdeebfc65ccbe2a3 (patch)
tree2f40527cb637f836bf3389616c9f952f6ab65b9a
parent8635511b282f8a19db8ef3211b80767efcff74b4 (diff)
downloadvdr-1922b1401048262b1f6a931ebdeebfc65ccbe2a3.tar.gz
vdr-1922b1401048262b1f6a931ebdeebfc65ccbe2a3.tar.bz2
Changed the behaviour of the '0' key in normal viewing mode to have a 3 second timeout
-rw-r--r--CONTRIBUTORS5
-rw-r--r--HISTORY3
-rw-r--r--MANUAL3
-rw-r--r--vdr.c12
4 files changed, 19 insertions, 4 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index cccbc040..6736a70c 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -724,3 +724,8 @@ Thomas Schmidt <thomas.schmidt@in.stud.tu-ilmenau.de>
Michael Walle <michael.walle@web.de>
for reporting a bug in channel switching after Left/Right has been pressed
+
+Thomas Keil <tk@commedia-group.com>
+ for suggesting to change the behaviour of the '0' key in normal viewing mode so
+ that a channel only qualifies as "previous" if it has been selected for at least
+ 3 seconds
diff --git a/HISTORY b/HISTORY
index ec405655..13c691fe 100644
--- a/HISTORY
+++ b/HISTORY
@@ -2263,3 +2263,6 @@ Video Disk Recorder Revision History
- Fixed creating a new channel in the "Channels" menu in case the 'channels.conf'
contains ':@nnn' lines with no text (thanks to Guy Roussin for reporting this
one).
+- Changed the behaviour of the '0' key in normal viewing mode so that a channel
+ only qualifies as "previous" if it has been selected for at least 3 seconds
+ (suggested by Thomas Keil).
diff --git a/MANUAL b/MANUAL
index 742b743b..46389af8 100644
--- a/MANUAL
+++ b/MANUAL
@@ -154,7 +154,8 @@ Version 1.2
menu) by pressing the "Blue" button.
Pressing the '0' key in normal viewing mode toggles between the current and
- the previous channel.
+ the previous channel. A channel is considered "previous" if it has been
+ selected for at least 3 seconds.
After switching to a different channel the channel number and name, as well
as the current time are displayed at the top of the screen. If available, the
diff --git a/vdr.c b/vdr.c
index 6a6c35dc..e51d9508 100644
--- a/vdr.c
+++ b/vdr.c
@@ -22,7 +22,7 @@
*
* The project's page is at http://www.cadsoft.de/vdr
*
- * $Id: vdr.c 1.160 2003/05/29 12:27:26 kls Exp $
+ * $Id: vdr.c 1.161 2003/06/15 14:35:05 kls Exp $
*/
#include <getopt.h>
@@ -57,6 +57,7 @@
#define ACTIVITYTIMEOUT 60 // seconds before starting housekeeping
#define SHUTDOWNWAIT 300 // seconds to wait in user prompt before automatic shutdown
#define MANUALSTART 600 // seconds the next timer must be in the future to assume manual start
+#define ZAPTIMEOUT 3 // seconds until a channel counts as "previous" for switching with '0'
static int Interrupted = 0;
@@ -455,6 +456,8 @@ int main(int argc, char *argv[])
int LastChannel = -1;
int LastTimerChannel = -1;
int PreviousChannel = cDevice::CurrentChannel();
+ int LastLastChannel = PreviousChannel;
+ time_t LastChannelChanged = time(NULL);
time_t LastActivity = 0;
int MaxLatencyTime = 0;
bool ForceShutdown = false;
@@ -492,9 +495,12 @@ int main(int argc, char *argv[])
if (!EITScanner.Active() && cDevice::CurrentChannel() != LastChannel) {
if (!Menu)
Menu = Temp = new cDisplayChannel(cDevice::CurrentChannel(), LastChannel > 0);
- if (LastChannel > 0)
- PreviousChannel = LastChannel;
LastChannel = cDevice::CurrentChannel();
+ LastChannelChanged = time(NULL);
+ }
+ if (LastLastChannel != LastChannel && time(NULL) - LastChannelChanged >= ZAPTIMEOUT) {
+ PreviousChannel = LastLastChannel;
+ LastLastChannel = LastChannel;
}
// Timers and Recordings:
if (!Timers.BeingEdited()) {