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

The "Source" item in the "Edit channel" menu now wraps around the list of sources

This commit is contained in:
Klaus Schmidinger 2010-03-06 12:47:47 +01:00
parent ab9af4cea1
commit e7148f3bee
3 changed files with 16 additions and 5 deletions

View File

@ -2389,6 +2389,8 @@ Halim Sahin <halim.sahin@t-online.de>
works if the "EPG scan" is active works if the "EPG scan" is active
for reporting a problem with adding new transponders in case there is only a single for reporting a problem with adding new transponders in case there is only a single
channel in the channel list channel in the channel list
for suggesting to make the "Source" item in the "Edit channel" menu wrap around the
list of sources
Denis Knauf <denis.knauf@gmail.com> Denis Knauf <denis.knauf@gmail.com>
for reporting a missing '-' at the next to last line of SVDRP help texts for reporting a missing '-' at the next to last line of SVDRP help texts

View File

@ -6391,3 +6391,5 @@ Video Disk Recorder Revision History
- Assigned the source character 'V' to "Analog Video" (suggested by Lars Hanisch). - Assigned the source character 'V' to "Analog Video" (suggested by Lars Hanisch).
- Added support for ATSC devices (thanks to Alex Lasnier). - Added support for ATSC devices (thanks to Alex Lasnier).
This obsoletes the ATSC patch. This obsoletes the ATSC patch.
- The "Source" item in the "Edit channel" menu now wraps around the list of sources
(suggested by Halim Sahin).

15
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 2.17 2010/02/21 14:09:19 kls Exp $ * $Id: menu.c 2.18 2010/03/06 12:43:15 kls Exp $
*/ */
#include "menu.h" #include "menu.h"
@ -160,16 +160,23 @@ eOSState cMenuEditSrcItem::ProcessKey(eKeys Key)
eOSState state = cMenuEditItem::ProcessKey(Key); eOSState state = cMenuEditItem::ProcessKey(Key);
if (state == osUnknown) { if (state == osUnknown) {
if (NORMALKEY(Key) == kLeft) { // TODO might want to increase the delta if repeated quickly? bool IsRepeat = Key & k_Repeat;
if (source && source->Prev()) { Key = NORMALKEY(Key);
if (Key == kLeft) { // TODO might want to increase the delta if repeated quickly?
if (source) {
if (source->Prev())
source = (cSource *)source->Prev(); source = (cSource *)source->Prev();
else if (!IsRepeat)
source = Sources.Last();
*value = source->Code(); *value = source->Code();
} }
} }
else if (NORMALKEY(Key) == kRight) { else if (Key == kRight) {
if (source) { if (source) {
if (source->Next()) if (source->Next())
source = (cSource *)source->Next(); source = (cSource *)source->Next();
else if (!IsRepeat)
source = Sources.First();
} }
else else
source = Sources.First(); source = Sources.First();