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

Implemented toggling between current and previous channel

This commit is contained in:
Klaus Schmidinger 2000-10-03 14:06:44 +02:00
parent 1c9122ae03
commit 48613fdb14
4 changed files with 18 additions and 6 deletions

View File

@ -218,3 +218,5 @@ Video Disk Recorder Revision History
- Added the description of the timers.conf file to the FORMATS file. - Added the description of the timers.conf file to the FORMATS file.
- Displaying as much as possible of the current/next info (dropping characters - Displaying as much as possible of the current/next info (dropping characters
that would display only partially). that would display only partially).
- In normal viewing mode the '0' key now toggles between the current and the
previous channel.

7
MANUAL
View File

@ -66,9 +66,12 @@ Video Disk Recorder User's Manual
if no key is pressed for about half a second, the digits collected so if no key is pressed for about half a second, the digits collected so
far will define the channel number. far will define the channel number.
Pressing the '0' key toggles between the current and the previous channel.
After switching to a different channel the channel number and name, as well 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. This line as the current time are displayed at the top of the screen. If available, the
automatically goes away after about two seconds, or if any key is pressed. 'current/next' information will be displayed below this line. This display
automatically goes away after about five seconds, or if any key is pressed.
To bring up the channel display without switching channels you can press To bring up the channel display without switching channels you can press
the "Ok" button. the "Ok" button.

4
menu.c
View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and * See the main source file 'vdr.c' for copyright information and
* how to reach the author. * how to reach the author.
* *
* $Id: menu.c 1.29 2000/10/03 12:38:03 kls Exp $ * $Id: menu.c 1.30 2000/10/03 14:06:44 kls Exp $
*/ */
#include "menu.h" #include "menu.h"
@ -1186,7 +1186,7 @@ cDirectChannelSelect::~cDirectChannelSelect()
eOSState cDirectChannelSelect::ProcessKey(eKeys Key) eOSState cDirectChannelSelect::ProcessKey(eKeys Key)
{ {
switch (Key) { switch (Key) {
case k0: case k1: case k2: case k3: case k4: case k5: case k6: case k7: case k8: case k9: case k0 ... k9:
if (number >= 0) { if (number >= 0) {
number = number * 10 + Key - k0; number = number * 10 + Key - k0;
cChannel *channel = Channels.GetByNumber(number); cChannel *channel = Channels.GetByNumber(number);

11
vdr.c
View File

@ -22,7 +22,7 @@
* *
* The project's page is at http://www.cadsoft.de/people/kls/vdr * The project's page is at http://www.cadsoft.de/people/kls/vdr
* *
* $Id: vdr.c 1.35 2000/09/20 16:45:01 kls Exp $ * $Id: vdr.c 1.36 2000/10/03 13:52:26 kls Exp $
*/ */
#include <getopt.h> #include <getopt.h>
@ -193,12 +193,14 @@ int main(int argc, char *argv[])
cOsdBase *Menu = NULL; cOsdBase *Menu = NULL;
cReplayControl *ReplayControl = NULL; cReplayControl *ReplayControl = NULL;
int LastChannel = -1; int LastChannel = -1;
int PreviousChannel = CurrentChannel;
while (!Interrupted) { while (!Interrupted) {
// Channel display: // Channel display:
if (CurrentChannel != LastChannel) { if (CurrentChannel != LastChannel) {
if (!Menu) if (!Menu)
Channels.ShowChannel(CurrentChannel, LastChannel > 0); Channels.ShowChannel(CurrentChannel, LastChannel > 0);
PreviousChannel = LastChannel;
LastChannel = CurrentChannel; LastChannel = CurrentChannel;
} }
// Timers and Recordings: // Timers and Recordings:
@ -244,8 +246,13 @@ int main(int argc, char *argv[])
} }
else { else {
switch (key) { switch (key) {
// Toggle channels:
case k0:
if (PreviousChannel != CurrentChannel)
Channels.SwitchTo(PreviousChannel);
break;
// Direct Channel Select: // Direct Channel Select:
case k0: case k1: case k2: case k3: case k4: case k5: case k6: case k7: case k8: case k9: case k1 ... k9:
if (!Interface.Recording()) if (!Interface.Recording())
Menu = new cDirectChannelSelect(key); Menu = new cDirectChannelSelect(key);
break; break;