The "Channels" menu now indicates whether a channel is encrypted or a radio channel

This commit is contained in:
Klaus Schmidinger 2017-06-10 15:57:33 +02:00
parent deb96b372e
commit a98f6ca354
3 changed files with 11 additions and 5 deletions

View File

@ -2117,6 +2117,8 @@ Martin Wache <M.Wache@gmx.net>
for suggesting to speed up anti-aliased font rendering by caching the blend indexes for suggesting to speed up anti-aliased font rendering by caching the blend indexes
for extending the option "Setup/Miscellaneous/Show channel names with source" to for extending the option "Setup/Miscellaneous/Show channel names with source" to
"type" or "full" "type" or "full"
for making the "Channels" menu indicate whether a channel is encrypted or a radio
channel
Matthias Lenk <matthias.lenk@amd.com> Matthias Lenk <matthias.lenk@amd.com>
for reporting an out-of-bounds memory access with audio language ids for reporting an out-of-bounds memory access with audio language ids

View File

@ -9119,3 +9119,5 @@ Video Disk Recorder Revision History
- The option "Setup/Miscellaneous/Show channel names with source" can now be set to - The option "Setup/Miscellaneous/Show channel names with source" can now be set to
"type" or "full" to show either the type or the full name of the source (thanks to "type" or "full" to show either the type or the full name of the source (thanks to
Martin Wache). Martin Wache).
- The "Channels" menu now indicates whether a channel is encrypted ('X') or a radio
channel ('R') (thanks to Martin Wache).

12
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 4.35 2017/06/10 15:13:00 kls Exp $ * $Id: menu.c 4.36 2017/06/10 15:53:20 kls Exp $
*/ */
#include "menu.h" #include "menu.h"
@ -327,13 +327,15 @@ void cMenuChannelItem::Set(void)
{ {
cString buffer; cString buffer;
if (!channel->GroupSep()) { if (!channel->GroupSep()) {
const char *X = *channel->Caids() >= CA_ENCRYPTED_MIN ? "X" : "";
const char *R = !channel->Vpid() && (*channel->Apids() || *channel->Dpids()) ? "R" : "";
if (sortMode == csmProvider) if (sortMode == csmProvider)
buffer = cString::sprintf("%d\t%s - %s", channel->Number(), channel->Provider(), channel->Name()); buffer = cString::sprintf("%d\t%s%s\t%s - %s", channel->Number(), X, R, channel->Provider(), channel->Name());
else else
buffer = cString::sprintf("%d\t%s", channel->Number(), channel->Name()); buffer = cString::sprintf("%d\t%s%s\t%s", channel->Number(), X, R, channel->Name());
} }
else else
buffer = cString::sprintf("---\t%s ----------------------------------------------------------------", channel->Name()); buffer = cString::sprintf("\t\t%s ----------------------------------------------------------------", channel->Name());
SetText(buffer); SetText(buffer);
} }
@ -369,7 +371,7 @@ public:
}; };
cMenuChannels::cMenuChannels(void) cMenuChannels::cMenuChannels(void)
:cOsdMenu(tr("Channels"), CHNUMWIDTH) :cOsdMenu(tr("Channels"), CHNUMWIDTH, 3)
{ {
SetMenuCategory(mcChannel); SetMenuCategory(mcChannel);
number = 0; number = 0;