mirror of
https://github.com/vdr-projects/vdr.git
synced 2025-03-01 10:50:46 +00:00
The new setup option "Miscellaneous/Channels wrap" controls whether the current channel wraps around the beginning or end of the channel list when zapping
This commit is contained in:
5
menu.c
5
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 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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user