diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2017-01-23 12:01:48 +0100 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2017-01-23 12:01:48 +0100 |
commit | 9b9d15438e37e968940b0d4056ae5f40202a9257 (patch) | |
tree | 89a95f6dda9c20aed0ff449ec5acee653d33076c /menu.c | |
parent | 6121095a300bb5cd8731aefb74bc7b26315ce985 (diff) | |
download | vdr-9b9d15438e37e968940b0d4056ae5f40202a9257.tar.gz vdr-9b9d15438e37e968940b0d4056ae5f40202a9257.tar.bz2 |
Implemented the concept of 'master cams'
Diffstat (limited to 'menu.c')
-rw-r--r-- | menu.c | 19 |
1 files changed, 14 insertions, 5 deletions
@@ -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(); } |