move startchannel menu to service

git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@1190 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
satbaby
2011-02-21 15:32:59 +00:00
parent eff8bd2404
commit 840be9e3b8
4 changed files with 21 additions and 12 deletions

View File

@@ -147,11 +147,13 @@ int CSelectChannelWidget::exec(CMenuTarget* parent, const std::string& actionKey
extern CBouquetManager *g_bouquetManager;
void CSelectChannelWidget::InitZapitChannelHelper(CZapitClient::channelsMode mode)
{
std::vector<CMenuWidget *> toDelete;
CMenuWidget mctv(LOCALE_TIMERLIST_BOUQUETSELECT, NEUTRINO_ICON_SETTINGS, width, height);
mctv.addIntroItems();
for (int i = 0; i < (int) g_bouquetManager->Bouquets.size(); i++) {
CMenuWidget* mwtv = new CMenuWidget(LOCALE_TIMERLIST_CHANNELSELECT, NEUTRINO_ICON_SETTINGS, width, height);
toDelete.push_back(mwtv);
mwtv->addIntroItems();
ZapitChannelList channels = (mode == CZapitClient::MODE_RADIO) ? g_bouquetManager->Bouquets[i]->radioChannels : g_bouquetManager->Bouquets[i]->tvChannels;
for(int j = 0; j < (int) channels.size(); j++) {
@@ -171,4 +173,11 @@ void CSelectChannelWidget::InitZapitChannelHelper(CZapitClient::channelsMode mod
}
mctv.exec (NULL, "");
mctv.hide ();
// delete dynamic created objects
for(unsigned int count=0;count<toDelete.size();count++)
{
delete toDelete[count];
}
toDelete.clear();
}