summaryrefslogtreecommitdiff
path: root/menu.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2017-01-23 12:01:48 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2017-01-23 12:01:48 +0100
commit9b9d15438e37e968940b0d4056ae5f40202a9257 (patch)
tree89a95f6dda9c20aed0ff449ec5acee653d33076c /menu.c
parent6121095a300bb5cd8731aefb74bc7b26315ce985 (diff)
downloadvdr-9b9d15438e37e968940b0d4056ae5f40202a9257.tar.gz
vdr-9b9d15438e37e968940b0d4056ae5f40202a9257.tar.bz2
Implemented the concept of 'master cams'
Diffstat (limited to 'menu.c')
-rw-r--r--menu.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/menu.c b/menu.c
index f784d16f..642432ac 100644
--- a/menu.c
+++ b/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 4.20 2017/01/09 14:45:50 kls Exp $
+ * $Id: menu.c 4.21 2017/01/23 12:01:48 kls Exp $
*/
#include "menu.h"
@@ -3770,8 +3770,15 @@ bool cMenuSetupCAMItem::Changed(void)
else if (camSlot->IsActivating())
// TRANSLATORS: note the leading blank!
Activating = tr(" (activating)");
- if (cDevice *Device = camSlot->Device())
- AssignedDevice = cString::sprintf(" %s %d", tr("@ device"), Device->CardIndex() + 1);
+ for (cCamSlot *CamSlot = CamSlots.First(); CamSlot; CamSlot = CamSlots.Next(CamSlot)) {
+ if (CamSlot == camSlot || CamSlot->MasterSlot() == camSlot) {
+ if (cDevice *Device = CamSlot->Device()) {
+ if (!**AssignedDevice)
+ AssignedDevice = cString::sprintf(" %s", tr("@ device"));
+ AssignedDevice = cString::sprintf("%s %d", *AssignedDevice, Device->CardIndex() + 1);
+ }
+ }
+ }
cString buffer = cString::sprintf(" %d %s%s%s", camSlot->SlotNumber(), CamName, *AssignedDevice, Activating);
if (strcmp(buffer, Text()) != 0) {
SetText(buffer);
@@ -3799,8 +3806,10 @@ cMenuSetupCAM::cMenuSetupCAM(void)
SetSection(tr("CAM"));
SetCols(15);
SetHasHotkeys();
- for (cCamSlot *CamSlot = CamSlots.First(); CamSlot; CamSlot = CamSlots.Next(CamSlot))
- Add(new cMenuSetupCAMItem(CamSlot));
+ for (cCamSlot *CamSlot = CamSlots.First(); CamSlot; CamSlot = CamSlots.Next(CamSlot)) {
+ if (CamSlot->IsMasterSlot()) // we only list master CAM slots
+ Add(new cMenuSetupCAMItem(CamSlot));
+ }
SetHelpKeys();
}