channel list: restrict adding channels to favorits only,

show empty bouquets only in channel add mode
This commit is contained in:
[CST] Focus
2013-09-18 12:57:56 +04:00
parent 12d005d1ea
commit 8a8f996ca0
3 changed files with 36 additions and 9 deletions

View File

@@ -87,6 +87,7 @@ extern CBouquetList * RADIObouquetList;
extern CBouquetList * RADIOsatList;
extern CBouquetList * RADIOfavList;
extern CBouquetList * RADIOallList;
extern CBouquetList * AllFavBouquetList;
extern bool autoshift;
@@ -423,6 +424,7 @@ int CChannelList::doChannelMenu(void)
break;
case 2: // add to
#if 0
/* default to favorites list, it makes no sense to add to autogenerated bouquets */
if (CNeutrinoApp::getInstance()->GetChannelMode() != 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;