diff --git a/src/gui/bouquetlist.cpp b/src/gui/bouquetlist.cpp index cf193828c..5c47e3e4e 100644 --- a/src/gui/bouquetlist.cpp +++ b/src/gui/bouquetlist.cpp @@ -396,39 +396,41 @@ int CBouquetList::show(bool bShowChannelList) loop=false; } else if(msg == CRCInput::RC_red || msg == CRCInput::RC_favorites) { - if (CNeutrinoApp::getInstance()->GetChannelMode() != LIST_MODE_FAV) { + if (!favonly && CNeutrinoApp::getInstance()->GetChannelMode() != LIST_MODE_FAV) { CNeutrinoApp::getInstance()->SetChannelMode(LIST_MODE_FAV); hide(); return -3; } } else if(msg == CRCInput::RC_green) { - if (CNeutrinoApp::getInstance()->GetChannelMode() != LIST_MODE_PROV) { + if (!favonly && CNeutrinoApp::getInstance()->GetChannelMode() != LIST_MODE_PROV) { CNeutrinoApp::getInstance()->SetChannelMode(LIST_MODE_PROV); hide(); return -3; } } else if(msg == CRCInput::RC_yellow || msg == CRCInput::RC_sat) { - if(bShowChannelList && CNeutrinoApp::getInstance()->GetChannelMode() != LIST_MODE_SAT) { + if(!favonly && bShowChannelList && CNeutrinoApp::getInstance()->GetChannelMode() != LIST_MODE_SAT) { CNeutrinoApp::getInstance()->SetChannelMode(LIST_MODE_SAT); hide(); return -3; } } else if(msg == CRCInput::RC_blue) { - if(bShowChannelList && CNeutrinoApp::getInstance()->GetChannelMode() != LIST_MODE_ALL) { + if(!favonly && bShowChannelList && CNeutrinoApp::getInstance()->GetChannelMode() != LIST_MODE_ALL) { CNeutrinoApp::getInstance()->SetChannelMode(LIST_MODE_ALL); hide(); return -3; } } else if ( msg == CRCInput::RC_setup) { - if (!Bouquets.empty()) { + if (!favonly && !Bouquets.empty()) { int ret = doMenu(); if(ret > 0) { CNeutrinoApp::getInstance()->MarkChannelListChanged(); res = -4; loop = false; - } else if(ret < 0) + } else if(ret < 0) { + paintHead(); paint(); + } } } else if ( msg == (neutrino_msg_t) g_settings.key_list_start ) { @@ -599,11 +601,17 @@ void CBouquetList::paint() frameBuffer->paintBoxRel(x, y+theight, width, height - theight - footerHeight, COL_MENUCONTENT_PLUS_0); int numbuttons = sizeof(CBouquetListButtons)/sizeof(CBouquetListButtons[0]); +#if 0 if (favonly) /* this actually shows favorites and providers button, but both are active anyway */ numbuttons = 2; ::paintButtons(x, y + (height - footerHeight), width, numbuttons, CBouquetListButtons, width, footerHeight); - +#endif + if (favonly) + frameBuffer->paintBoxRel(x, y + (height - footerHeight), width, footerHeight, COL_INFOBAR_SHADOW_PLUS_1, RADIUS_LARGE, CORNER_BOTTOM); //round + else + ::paintButtons(x, y + (height - footerHeight), width, numbuttons, CBouquetListButtons, width, footerHeight); + if(!Bouquets.empty()) { for(unsigned int count=0;countGetChannelMode() != LIST_MODE_FAV) CNeutrinoApp::getInstance()->SetChannelMode(LIST_MODE_FAV); @@ -430,6 +432,7 @@ int CChannelList::doChannelMenu(void) do { bouquet_id = bouquetList->exec(false); } while(bouquet_id == -3); + bouquet_id = bouquetList->exec(false); hide(); if(bouquet_id < 0) return 0; @@ -438,6 +441,16 @@ int CChannelList::doChannelMenu(void) bouquet_id = g_bouquetManager->existsUBouquet(g_Locale->getText(LOCALE_FAVORITES_BOUQUETNAME), true); else bouquet_id = g_bouquetManager->existsBouquet(bouquetList->Bouquets[bouquet_id]->channelList->getName()); +#endif + bouquet_id = AllFavBouquetList->exec(false); + hide(); + if(bouquet_id < 0) + return 0; + + if(!strcmp(AllFavBouquetList->Bouquets[bouquet_id]->channelList->getName(), g_Locale->getText(LOCALE_FAVORITES_BOUQUETNAME))) + bouquet_id = g_bouquetManager->existsUBouquet(g_Locale->getText(LOCALE_FAVORITES_BOUQUETNAME), true); + else + bouquet_id = g_bouquetManager->existsUBouquet(AllFavBouquetList->Bouquets[bouquet_id]->channelList->getName()); if (bouquet_id == -1) return 0; diff --git a/src/neutrino.cpp b/src/neutrino.cpp index 7c83ff424..eb6cd06cd 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -173,6 +173,8 @@ CBouquetList * RADIOsatList; CBouquetList * RADIOfavList; CBouquetList * RADIOallList; +CBouquetList * AllFavBouquetList; + CPlugins * g_PluginList; CRemoteControl * g_RemoteControl; CPictureViewer * g_PicViewer; @@ -1351,12 +1353,14 @@ void CNeutrinoApp::channelsInit(bool bOnly) TIMER_STOP("[neutrino] sats took"); } + delete AllFavBouquetList; + AllFavBouquetList = new CBouquetList(g_Locale->getText(LOCALE_CHANNELLIST_FAVS)); /* Favorites and providers bouquets */ tvi = ri = 0; for (i = 0; i < g_bouquetManager->Bouquets.size(); i++) { CZapitBouquet *b = g_bouquetManager->Bouquets[i]; if (!b->bHidden) { - if (b->getTvChannels(zapitList) || b->bUser) { + if (b->getTvChannels(zapitList) /* || b->bUser */) { if(b->bUser) tmp = TVfavList->addBouquet(b); else @@ -1365,7 +1369,7 @@ void CNeutrinoApp::channelsInit(bool bOnly) tmp->channelList->SetChannelList(&zapitList); tvi++; } - if (b->getRadioChannels(zapitList) || b->bUser) { + if (b->getRadioChannels(zapitList) /* || b->bUser */) { if(b->bUser) tmp = RADIOfavList->addBouquet(b); else @@ -1374,6 +1378,8 @@ void CNeutrinoApp::channelsInit(bool bOnly) tmp->channelList->SetChannelList(&zapitList); ri++; } + if(b->bUser) + AllFavBouquetList->addBouquet(b); } } printf("[neutrino] got %d TV and %d RADIO bouquets\n", tvi, ri); fflush(stdout);