From 6fe4b8aad46813bf22b4b70605cd8289c724d365 Mon Sep 17 00:00:00 2001 From: "[CST] Focus" Date: Wed, 30 Jan 2013 11:54:49 +0400 Subject: [PATCH] gui/timerlist.cpp: filter bouquets channels --- src/gui/timerlist.cpp | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/src/gui/timerlist.cpp b/src/gui/timerlist.cpp index 2491ddcc3..9da35659a 100644 --- a/src/gui/timerlist.cpp +++ b/src/gui/timerlist.cpp @@ -1177,23 +1177,24 @@ int CTimerList::newTimer() CMenuWidget* mwradio = new CMenuWidget(LOCALE_TIMERLIST_CHANNELSELECT, NEUTRINO_ICON_SETTINGS); toDelete.push_back(mwradio); - ZapitChannelList* channels = &(g_bouquetManager->Bouquets[i]->tvChannels); - for (int j = 0; j < (int) channels->size(); j++) { + ZapitChannelList channels; + g_bouquetManager->Bouquets[i]->getTvChannels(channels); + for (int j = 0; j < (int) channels.size(); j++) { char cChannelId[3+16+1+1]; - sprintf(cChannelId, "SC:" PRINTF_CHANNEL_ID_TYPE_NO_LEADING_ZEROS ",", (*channels)[j]->channel_id); - mwtv->addItem(new CMenuForwarderNonLocalized((*channels)[j]->getName().c_str(), true, NULL, this, (std::string(cChannelId) + (*channels)[j]->getName()).c_str(), CRCInput::RC_nokey, NULL, (*channels)[j]->scrambled ? NEUTRINO_ICON_SCRAMBLED : NULL)); + sprintf(cChannelId, "SC:" PRINTF_CHANNEL_ID_TYPE_NO_LEADING_ZEROS ",", channels[j]->channel_id); + mwtv->addItem(new CMenuForwarderNonLocalized(channels[j]->getName().c_str(), true, NULL, this, (std::string(cChannelId) + channels[j]->getName()).c_str(), CRCInput::RC_nokey, NULL, channels[j]->scrambled ? NEUTRINO_ICON_SCRAMBLED : NULL)); } - if (!channels->empty()) + if (!channels.empty()) mctv.addItem(new CMenuForwarderNonLocalized(g_bouquetManager->Bouquets[i]->bFav ? g_Locale->getText(LOCALE_FAVORITES_BOUQUETNAME) : g_bouquetManager->Bouquets[i]->Name.c_str() /*g_bouquetManager->Bouquets[i]->Name.c_str()*/, true, NULL, mwtv)); - channels = &(g_bouquetManager->Bouquets[i]->radioChannels); - for (int j = 0; j < (int) channels->size(); j++) { + g_bouquetManager->Bouquets[i]->getRadioChannels(channels); + for (int j = 0; j < (int) channels.size(); j++) { char cChannelId[3+16+1+1]; - sprintf(cChannelId, "SC:" PRINTF_CHANNEL_ID_TYPE_NO_LEADING_ZEROS ",", (*channels)[j]->channel_id); - mwradio->addItem(new CMenuForwarderNonLocalized((*channels)[j]->getName().c_str(), true, NULL, this, (std::string(cChannelId) + (*channels)[j]->getName()).c_str(), CRCInput::RC_nokey, NULL, (*channels)[j]->scrambled ? NEUTRINO_ICON_SCRAMBLED : NULL)); + sprintf(cChannelId, "SC:" PRINTF_CHANNEL_ID_TYPE_NO_LEADING_ZEROS ",", channels[j]->channel_id); + mwradio->addItem(new CMenuForwarderNonLocalized(channels[j]->getName().c_str(), true, NULL, this, (std::string(cChannelId) + channels[j]->getName()).c_str(), CRCInput::RC_nokey, NULL, channels[j]->scrambled ? NEUTRINO_ICON_SCRAMBLED : NULL)); } - if (!channels->empty()) + if (!channels.empty()) mcradio.addItem(new CMenuForwarderNonLocalized(g_bouquetManager->Bouquets[i]->Name.c_str(), true, NULL, mwradio)); } }