From 3a52a97fce8b09ea3107dda00884f72d5825a08a Mon Sep 17 00:00:00 2001 From: martii Date: Sun, 25 May 2014 15:44:27 +0200 Subject: [PATCH] zapit/bouquets: rename bAlwaysLocked => bLockCount --- src/daemonc/remotecontrol.cpp | 2 +- src/gui/bedit/bouqueteditor_bouquets.cpp | 10 +++++----- src/gui/channellist.cpp | 4 ++-- src/zapit/include/zapit/channel.h | 2 +- src/zapit/src/bouquets.cpp | 4 ++-- src/zapit/src/channel.cpp | 2 +- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/daemonc/remotecontrol.cpp b/src/daemonc/remotecontrol.cpp index 5f001b20f..37b063865 100644 --- a/src/daemonc/remotecontrol.cpp +++ b/src/daemonc/remotecontrol.cpp @@ -147,7 +147,7 @@ int CRemoteControl::handleMsg(const neutrino_msg_t msg, neutrino_msg_data_t data is_video_started = true; if (channel) { current_channel_name = channel->getName(); - if (!!channel->bAlwaysLocked != g_settings.parentallock_defaultlocked) + if (!!channel->bLockCount != g_settings.parentallock_defaultlocked) stopvideo(); } CVFD::getInstance()->showServicename(current_channel_name); // UTF-8 diff --git a/src/gui/bedit/bouqueteditor_bouquets.cpp b/src/gui/bedit/bouqueteditor_bouquets.cpp index d14934c22..effe45515 100644 --- a/src/gui/bedit/bouqueteditor_bouquets.cpp +++ b/src/gui/bedit/bouqueteditor_bouquets.cpp @@ -433,11 +433,11 @@ void CBEBouquetWidget::deleteBouquet() if ((*Bouquets)[selected]->bLocked) { ZapitChannelList *channels = &(*Bouquets)[selected]->tvChannels; for(unsigned int i = 0; i < channels->size(); i++) - ((*channels)[i])->bAlwaysLocked--; + ((*channels)[i])->bLockCount--; channels = &(*Bouquets)[selected]->radioChannels; for(unsigned int i = 0; i < channels->size(); i++) - ((*channels)[i])->bAlwaysLocked--; + ((*channels)[i])->bLockCount--; } g_bouquetManager->deleteBouquet(selected); @@ -531,15 +531,15 @@ void CBEBouquetWidget::switchLockBouquet() (*Bouquets)[selected]->bLocked = !(*Bouquets)[selected]->bLocked; paint(); - int add = (*Bouquets)[selected]->bLocked ? +1 : -1; + int add = (*Bouquets)[selected]->bLocked * 2 - 1; ZapitChannelList *channels = &(*Bouquets)[selected]->tvChannels; for(unsigned int i = 0; i < channels->size(); i++) - ((*channels)[i])->bAlwaysLocked += add; + ((*channels)[i])->bLockCount += add; channels = &(*Bouquets)[selected]->radioChannels; for(unsigned int i = 0; i < channels->size(); i++) - ((*channels)[i])->bAlwaysLocked += add; + ((*channels)[i])->bLockCount += add; } std::string CBEBouquetWidget::inputName(const char * const defaultName, const neutrino_locale_t caption) diff --git a/src/gui/channellist.cpp b/src/gui/channellist.cpp index 04cb89964..d8fd53e1a 100644 --- a/src/gui/channellist.cpp +++ b/src/gui/channellist.cpp @@ -352,7 +352,7 @@ int CChannelList::doChannelMenu(void) * a channel could be added/removed to/from an unlocked bouquet and so made * accessible. */ if (g_settings.parentallock_prompt == PARENTALLOCK_PROMPT_CHANGETOLOCKED && - !!chanlist[selected]->bAlwaysLocked != g_settings.parentallock_defaultlocked) + !!chanlist[selected]->bLockCount != g_settings.parentallock_defaultlocked) unlocked = (chanlist[selected]->last_unlocked_time + 3600 > time_monotonic()); snprintf(cnt, sizeof(cnt), "%d", i); @@ -1298,7 +1298,7 @@ void CChannelList::zapToChannel(CZapitChannel *channel, bool force) } selected_chid = channel->getChannelID(); - g_RemoteControl->zapTo_ChannelID(selected_chid, channel->getName(), (!!channel->bAlwaysLocked == g_settings.parentallock_defaultlocked)); + g_RemoteControl->zapTo_ChannelID(selected_chid, channel->getName(), (!!channel->bLockCount == g_settings.parentallock_defaultlocked)); CNeutrinoApp::getInstance()->channelList->adjustToChannelID(channel->getChannelID()); } if(new_zap_mode != 2 /* not active */) { diff --git a/src/zapit/include/zapit/channel.h b/src/zapit/include/zapit/channel.h index 2361df501..a59ac5251 100644 --- a/src/zapit/include/zapit/channel.h +++ b/src/zapit/include/zapit/channel.h @@ -178,7 +178,7 @@ class CZapitChannel } channel_flags_t; casys_map_t camap; - unsigned int bAlwaysLocked; + unsigned int bLockCount; int number; CChannelEvent currentEvent,nextEvent; diff --git a/src/zapit/src/bouquets.cpp b/src/zapit/src/bouquets.cpp index e1771d74d..8eafc1cd9 100644 --- a/src/zapit/src/bouquets.cpp +++ b/src/zapit/src/bouquets.cpp @@ -111,7 +111,7 @@ void CZapitBouquet::addService(CZapitChannel* newChannel) break; } if (bLocked) - newChannel->bAlwaysLocked++; + newChannel->bLockCount++; } void CZapitBouquet::removeService(CZapitChannel* oldChannel) @@ -131,7 +131,7 @@ void CZapitBouquet::removeService(CZapitChannel* oldChannel) } if (bLocked) - oldChannel->bAlwaysLocked--; + oldChannel->bLockCount--; (*channels).erase(remove(channels->begin(), channels->end(), oldChannel), channels->end()); } } diff --git a/src/zapit/src/channel.cpp b/src/zapit/src/channel.cpp index 89c6e21ad..fefb643c3 100644 --- a/src/zapit/src/channel.cpp +++ b/src/zapit/src/channel.cpp @@ -69,7 +69,7 @@ void CZapitChannel::Init() polarization = 0; flags = 0; deltype = FE_QPSK; - bAlwaysLocked = 0; + bLockCount = 0; } CZapitChannel::~CZapitChannel(void)