diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2010-01-17 15:21:28 +0100 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2010-01-17 15:21:28 +0100 |
commit | 27aaf4fc06d93885ae34e4a2d5c7086185f84bcd (patch) | |
tree | 97a8b7ad2f9c511e061a9713c3ca70dea88b0b59 /menu.c | |
parent | b19650251c4ad335a00d4e97fa642c54acd55a3e (diff) | |
download | vdr-27aaf4fc06d93885ae34e4a2d5c7086185f84bcd.tar.gz vdr-27aaf4fc06d93885ae34e4a2d5c7086185f84bcd.tar.bz2 |
The new setup option "Miscellaneous/Channels wrap" controls whether the current channel wraps around the beginning or end of the channel list when zapping
Diffstat (limited to 'menu.c')
-rw-r--r-- | menu.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: menu.c 2.11 2010/01/17 12:08:03 kls Exp $ + * $Id: menu.c 2.12 2010/01/17 15:10:07 kls Exp $ */ #include "menu.h" @@ -3039,6 +3039,7 @@ cMenuSetupMisc::cMenuSetupMisc(void) Add(new cMenuEditIntItem( tr("Setup.Miscellaneous$Channel entry timeout (ms)"), &data.ChannelEntryTimeout, 0)); Add(new cMenuEditChanItem(tr("Setup.Miscellaneous$Initial channel"), &data.InitialChannel, tr("Setup.Miscellaneous$as before"))); Add(new cMenuEditIntItem( tr("Setup.Miscellaneous$Initial volume"), &data.InitialVolume, -1, 255, tr("Setup.Miscellaneous$as before"))); + Add(new cMenuEditBoolItem(tr("Setup.Miscellaneous$Channels wrap"), &data.ChannelsWrap)); Add(new cMenuEditBoolItem(tr("Setup.Miscellaneous$Emergency exit"), &data.EmergencyExit)); } @@ -3538,6 +3539,8 @@ cChannel *cDisplayChannel::NextAvailableChannel(cChannel *Channel, int Direction if (Direction) { while (Channel) { Channel = Direction > 0 ? Channels.Next(Channel) : Channels.Prev(Channel); + if (!Channel && Setup.ChannelsWrap) + Channel = Direction > 0 ? Channels.First() : Channels.Last(); if (Channel && !Channel->GroupSep() && cDevice::GetDevice(Channel, 0, true)) return Channel; } |