No longer displaying channel group delimiters without text

This commit is contained in:
Klaus Schmidinger 2002-11-29 14:19:08 +01:00
parent 4ab777e98a
commit 88db59f61a
5 changed files with 22 additions and 15 deletions

View File

@ -480,3 +480,6 @@ R
Andreas Kool <akool@akool.de> Andreas Kool <akool@akool.de>
for pointing out problems with non-unique definitions in 'channels.conf.cable' for pointing out problems with non-unique definitions in 'channels.conf.cable'
Guy Roussin <guy.roussin@teledetection.fr>
for suggesting not to display channel group delimiters without text

View File

@ -1813,9 +1813,11 @@ Video Disk Recorder Revision History
makes far jumps, so that a lock file might end up with a time stamp that lies makes far jumps, so that a lock file might end up with a time stamp that lies
in the distant future (thanks to Oliver Endriss). in the distant future (thanks to Oliver Endriss).
2002-11-24: Version 1.1.18 2002-11-29: Version 1.1.18
- Fixed missing initialization of 'number' in cChannel (thanks to Martin Hammerschmid - Fixed missing initialization of 'number' in cChannel (thanks to Martin Hammerschmid
for reporting this one). for reporting this one).
- Fixed a misplaced ')' in the fix about the stale lock files (thanks again to - Fixed a misplaced ')' in the fix about the stale lock files (thanks again to
Oliver Endriss for pointing this out - it was my fault). Oliver Endriss for pointing this out - it was my fault).
- Group delimiters in the 'channels.conf' file that have no text (like a simple ":"
or ":@201") no longer show up in the Channels menu (suggested by Guy Roussin).

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: channels.c 1.10 2002/11/24 20:09:42 kls Exp $ * $Id: channels.c 1.11 2002/11/29 14:10:46 kls Exp $
*/ */
#include "channels.h" #include "channels.h"
@ -386,7 +386,7 @@ bool cChannels::Load(const char *FileName, bool AllowComments)
int cChannels::GetNextGroup(int Idx) int cChannels::GetNextGroup(int Idx)
{ {
cChannel *channel = Get(++Idx); cChannel *channel = Get(++Idx);
while (channel && !channel->GroupSep()) while (channel && !(channel->GroupSep() && *channel->Name()))
channel = Get(++Idx); channel = Get(++Idx);
return channel ? Idx : -1; return channel ? Idx : -1;
} }
@ -394,7 +394,7 @@ int cChannels::GetNextGroup(int Idx)
int cChannels::GetPrevGroup(int Idx) int cChannels::GetPrevGroup(int Idx)
{ {
cChannel *channel = Get(--Idx); cChannel *channel = Get(--Idx);
while (channel && !channel->GroupSep()) while (channel && !(channel->GroupSep() && *channel->Name()))
channel = Get(--Idx); channel = Get(--Idx);
return channel ? Idx : -1; return channel ? Idx : -1;
} }

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 1.226 2002/11/24 14:34:41 kls Exp $ * $Id: menu.c 1.227 2002/11/29 14:06:38 kls Exp $
*/ */
#include "menu.h" #include "menu.h"
@ -684,15 +684,10 @@ public:
cMenuChannels::cMenuChannels(void) cMenuChannels::cMenuChannels(void)
:cOsdMenu(tr("Channels"), CHNUMWIDTH) :cOsdMenu(tr("Channels"), CHNUMWIDTH)
{ {
//TODO for (cChannel *channel = Channels.First(); channel; channel = Channels.Next(channel)) {
int i = 0; if (!channel->GroupSep() || *channel->Name())
cChannel *channel; Add(new cMenuChannelItem(channel), channel->Number() == cDevice::CurrentChannel());
int curr = ((channel = Channels.GetByNumber(cDevice::CurrentChannel())) != NULL) ? channel->Index() : -1; }
while ((channel = Channels.Get(i)) != NULL) {
Add(new cMenuChannelItem(channel), i == curr);
i++;
}
SetHelp(tr("Edit"), tr("New"), tr("Delete"), tr("Mark")); SetHelp(tr("Edit"), tr("New"), tr("Delete"), tr("Mark"));
} }

9
vdr.5
View File

@ -8,7 +8,7 @@
.\" License as specified in the file COPYING that comes with the .\" License as specified in the file COPYING that comes with the
.\" vdr distribution. .\" vdr distribution.
.\" .\"
.\" $Id: vdr.5 1.14 2002/11/24 16:00:00 kls Exp $ .\" $Id: vdr.5 1.15 2002/11/29 14:13:40 kls Exp $
.\" .\"
.TH vdr 5 "24 Nov 2002" "1.2.0" "Video Disk Recorder Files" .TH vdr 5 "24 Nov 2002" "1.2.0" "Video Disk Recorder Files"
.SH NAME .SH NAME
@ -35,6 +35,13 @@ as in
The given number must be larger than the number of any previous channel The given number must be larger than the number of any previous channel
(otherwise it is silently ignored). (otherwise it is silently ignored).
A group delimiter can also be used to just set the next channel's number,
without an explicit delimiter text, as in
\fB:@201\fR
Such a delimiter will not appear in the Channels menu.
A \fBchannel definition\fR is a line with channel data, where the fields A \fBchannel definition\fR is a line with channel data, where the fields
are separated by ':' characters. Example: are separated by ':' characters. Example: