Adapted "Setup/Miscellaneous/Show channel names with source" to the new handling in cChannel

This commit is contained in:
Klaus Schmidinger 2024-03-02 21:49:21 +01:00
parent 8bd0437497
commit 561be36958
2 changed files with 12 additions and 2 deletions

View File

@ -9894,3 +9894,5 @@ Video Disk Recorder Revision History
- Added missing initialization of cChannel::nameSourceMode (thanks to Winfried Köhler).
- Modified handling channel names with source to make it thread safe (thanks to
Stefan Herdler).
- Adapted "Setup/Miscellaneous/Show channel names with source" to the new handling
in cChannel.

12
menu.c
View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: menu.c 5.10 2024/01/19 12:17:05 kls Exp $
* $Id: menu.c 5.11 2024/03/02 21:49:21 kls Exp $
*/
#include "menu.h"
@ -4285,9 +4285,17 @@ eOSState cMenuSetupMisc::ProcessKey(eKeys Key)
{
bool OldSVDRPPeering = data.SVDRPPeering;
bool ModifiedSVDRPSettings = false;
if (Key == kOk)
bool ModifiedShowChannelNamesWithSource = false;
if (Key == kOk) {
ModifiedSVDRPSettings = data.SVDRPPeering != Setup.SVDRPPeering || strcmp(data.SVDRPHostName, Setup.SVDRPHostName);
ModifiedShowChannelNamesWithSource = data.ShowChannelNamesWithSource != Setup.ShowChannelNamesWithSource;
}
eOSState state = cMenuSetupBase::ProcessKey(Key);
if (ModifiedShowChannelNamesWithSource) {
LOCK_CHANNELS_WRITE;
for (cChannel *Channel = Channels->First(); Channel; Channel = Channels->Next(Channel))
Channel->UpdateNameSource();
}
if (data.SVDRPPeering != OldSVDRPPeering)
Set();
if (ModifiedSVDRPSettings) {