mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-28 16:01:10 +02:00
CChannelList: fix code indentation
Origin commit data
------------------
Branch: ni/coolstream
Commit: 9fd3b27d61
Author: Thilo Graf <dbt@novatux.de>
Date: 2017-05-08 (Mon, 08 May 2017)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -360,96 +360,100 @@ int CChannelList::doChannelMenu(void)
|
|||||||
CBouquetList *blist = tvmode ? TVfavList : RADIOfavList;
|
CBouquetList *blist = tvmode ? TVfavList : RADIOfavList;
|
||||||
bool fav_found = true;
|
bool fav_found = true;
|
||||||
switch(select) {
|
switch(select) {
|
||||||
case 0: {// edit mode
|
case 0: // edit mode
|
||||||
bool unlocked = true;
|
{
|
||||||
if (g_settings.parentallock_prompt == PARENTALLOCK_PROMPT_CHANGETOLOCKED) {
|
bool unlocked = true;
|
||||||
int pl_z = g_settings.parentallock_zaptime * 60;
|
if (g_settings.parentallock_prompt == PARENTALLOCK_PROMPT_CHANGETOLOCKED) {
|
||||||
if (g_settings.personalize[SNeutrinoSettings::P_MSER_BOUQUET_EDIT] == CPersonalizeGui::PERSONALIZE_MODE_PIN) {
|
int pl_z = g_settings.parentallock_zaptime * 60;
|
||||||
unlocked = false;
|
|
||||||
} else if (bouquet && bouquet->zapitBouquet && bouquet->zapitBouquet->bLocked) {
|
if (g_settings.personalize[SNeutrinoSettings::P_MSER_BOUQUET_EDIT] == CPersonalizeGui::PERSONALIZE_MODE_PIN) {
|
||||||
/* on locked bouquet, enough to check any channel */
|
unlocked = false;
|
||||||
unlocked = ((*chanlist)[selected]->last_unlocked_time + pl_z > time_monotonic());
|
} else if (bouquet && bouquet->zapitBouquet && bouquet->zapitBouquet->bLocked) {
|
||||||
|
/* on locked bouquet, enough to check any channel */
|
||||||
|
unlocked = ((*chanlist)[selected]->last_unlocked_time + pl_z > time_monotonic());
|
||||||
|
} else {
|
||||||
|
/* check all locked channels for last_unlocked_time, overwrite only if already unlocked */
|
||||||
|
for (unsigned int j = 0 ; j < (*chanlist).size(); j++) {
|
||||||
|
if ((*chanlist)[j]->bLocked)
|
||||||
|
unlocked = unlocked && ((*chanlist)[j]->last_unlocked_time + pl_z > time_monotonic());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!unlocked) {
|
||||||
|
CZapProtection *zp = new CZapProtection(g_settings.parentallock_pincode, 0x100);
|
||||||
|
unlocked = zp->check();
|
||||||
|
delete zp;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (unlocked)
|
||||||
|
editMode(true);
|
||||||
|
|
||||||
|
ret = -1;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 1: // add to
|
||||||
|
if (!addChannelToBouquet())
|
||||||
|
return -1;
|
||||||
|
ret = 1;
|
||||||
|
break;
|
||||||
|
case 2: // add to my favorites
|
||||||
|
for (unsigned n = 0; n < AllFavBouquetList->Bouquets.size(); n++) {
|
||||||
|
if (AllFavBouquetList->Bouquets[n]->zapitBouquet && AllFavBouquetList->Bouquets[n]->zapitBouquet->bFav) {
|
||||||
|
CZapitChannel *ch = AllFavBouquetList->Bouquets[n]->zapitBouquet->getChannelByChannelID(channel_id);
|
||||||
|
if (ch == NULL) {
|
||||||
|
AllFavBouquetList->Bouquets[n]->zapitBouquet->addService((*chanlist)[selected]);
|
||||||
|
fav_found = false;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for (unsigned n = 0; n < blist->Bouquets.size() && !fav_found; n++) {
|
||||||
|
if (blist->Bouquets[n]->zapitBouquet && blist->Bouquets[n]->zapitBouquet->bFav) {
|
||||||
|
blist->Bouquets[n]->zapitBouquet->getChannels(blist->Bouquets[n]->channelList->channels, tvmode);
|
||||||
|
saveChanges();
|
||||||
|
fav_found = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!fav_found) {
|
||||||
|
CNeutrinoApp::getInstance()->MarkFavoritesChanged();
|
||||||
|
CNeutrinoApp::getInstance()->MarkChannelsInit();
|
||||||
|
}
|
||||||
|
ret = 1;
|
||||||
|
break;
|
||||||
|
case 3: // reset new
|
||||||
|
case 4: // reset all new
|
||||||
|
if (select == 3) {
|
||||||
|
(*chanlist)[selected]->flags = CZapitChannel::UPDATED;
|
||||||
} else {
|
} else {
|
||||||
/* check all locked channels for last_unlocked_time, overwrite only if already unlocked */
|
for (unsigned int j = 0 ; j < (*chanlist).size(); j++)
|
||||||
for (unsigned int j = 0 ; j < (*chanlist).size(); j++) {
|
(*chanlist)[j]->flags = CZapitChannel::UPDATED;
|
||||||
if ((*chanlist)[j]->bLocked)
|
|
||||||
unlocked = unlocked && ((*chanlist)[j]->last_unlocked_time + pl_z > time_monotonic());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (!unlocked) {
|
CNeutrinoApp::getInstance()->MarkChannelsChanged();
|
||||||
CZapProtection *zp = new CZapProtection(g_settings.parentallock_pincode, 0x100);
|
/* if make_new_list == ON, signal to re-init services */
|
||||||
unlocked = zp->check();
|
if(g_settings.make_new_list)
|
||||||
delete zp;
|
CNeutrinoApp::getInstance()->MarkChannelsInit();
|
||||||
|
break;
|
||||||
|
case 5: // clear channel history
|
||||||
|
{
|
||||||
|
CNeutrinoApp::getInstance()->channelList->getLastChannels().clear();
|
||||||
|
printf("%s:%d lastChList cleared\n", __FUNCTION__, __LINE__);
|
||||||
|
ret = -2; // exit channellist
|
||||||
}
|
}
|
||||||
}
|
break;
|
||||||
if (unlocked)
|
case 6: // settings
|
||||||
editMode(true);
|
{
|
||||||
ret = -1;
|
previous_channellist_additional = g_settings.channellist_additional;
|
||||||
break;
|
COsdSetup osd_setup;
|
||||||
}case 1: // add to
|
osd_setup.showContextChanlistMenu(this);
|
||||||
if (!addChannelToBouquet())
|
hide();
|
||||||
return -1;
|
ResetModules();
|
||||||
ret = 1;
|
//FIXME check font/options changed ?
|
||||||
break;
|
calcSize();
|
||||||
case 2: // add to my favorites
|
ret = -1;
|
||||||
for (unsigned n = 0; n < AllFavBouquetList->Bouquets.size(); n++) {
|
|
||||||
if (AllFavBouquetList->Bouquets[n]->zapitBouquet && AllFavBouquetList->Bouquets[n]->zapitBouquet->bFav) {
|
|
||||||
CZapitChannel *ch = AllFavBouquetList->Bouquets[n]->zapitBouquet->getChannelByChannelID(channel_id);
|
|
||||||
if (ch == NULL) {
|
|
||||||
AllFavBouquetList->Bouquets[n]->zapitBouquet->addService((*chanlist)[selected]);
|
|
||||||
fav_found = false;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
break;
|
||||||
for (unsigned n = 0; n < blist->Bouquets.size() && !fav_found; n++) {
|
default:
|
||||||
if (blist->Bouquets[n]->zapitBouquet && blist->Bouquets[n]->zapitBouquet->bFav) {
|
break;
|
||||||
blist->Bouquets[n]->zapitBouquet->getChannels(blist->Bouquets[n]->channelList->channels, tvmode);
|
|
||||||
saveChanges();
|
|
||||||
fav_found = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!fav_found) {
|
|
||||||
CNeutrinoApp::getInstance()->MarkFavoritesChanged();
|
|
||||||
CNeutrinoApp::getInstance()->MarkChannelsInit();
|
|
||||||
}
|
|
||||||
ret = 1;
|
|
||||||
break;
|
|
||||||
case 3: // reset new
|
|
||||||
case 4: // reset all new
|
|
||||||
if (select == 3) {
|
|
||||||
(*chanlist)[selected]->flags = CZapitChannel::UPDATED;
|
|
||||||
} else {
|
|
||||||
for (unsigned int j = 0 ; j < (*chanlist).size(); j++)
|
|
||||||
(*chanlist)[j]->flags = CZapitChannel::UPDATED;
|
|
||||||
}
|
|
||||||
CNeutrinoApp::getInstance()->MarkChannelsChanged();
|
|
||||||
/* if make_new_list == ON, signal to re-init services */
|
|
||||||
if(g_settings.make_new_list)
|
|
||||||
CNeutrinoApp::getInstance()->MarkChannelsInit();
|
|
||||||
break;
|
|
||||||
case 5: // clear channel history
|
|
||||||
{
|
|
||||||
CNeutrinoApp::getInstance()->channelList->getLastChannels().clear();
|
|
||||||
printf("%s:%d lastChList cleared\n", __FUNCTION__, __LINE__);
|
|
||||||
ret = -2; // exit channellist
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 6: // settings
|
|
||||||
{
|
|
||||||
previous_channellist_additional = g_settings.channellist_additional;
|
|
||||||
COsdSetup osd_setup;
|
|
||||||
osd_setup.showContextChanlistMenu(this);
|
|
||||||
hide();
|
|
||||||
ResetModules();
|
|
||||||
//FIXME check font/options changed ?
|
|
||||||
calcSize();
|
|
||||||
ret = -1;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
|
Reference in New Issue
Block a user