mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-29 08:21:07 +02:00
Neutrino: Channel list: add method isEmpty() and use it, ported from tuxbox cvs (THX Gaucho316)
Origin commit data
------------------
Branch: ni/coolstream
Commit: 35138088e3
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2012-10-20 (Sat, 20 Oct 2012)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -689,11 +689,11 @@ int CChannelList::show()
|
||||
if (!bouquetList->Bouquets.empty()) {
|
||||
bool found = true;
|
||||
uint32_t nNext = (bouquetList->getActiveBouquetNumber()+1) % bouquetList->Bouquets.size();
|
||||
if(bouquetList->Bouquets[nNext]->channelList->getSize() <= 0) {
|
||||
if(bouquetList->Bouquets[nNext]->channelList->isEmpty() ) {
|
||||
found = false;
|
||||
nNext = nNext < bouquetList->Bouquets.size()-1 ? nNext+1 : 0;
|
||||
for(uint32_t i = nNext; i < bouquetList->Bouquets.size(); i++) {
|
||||
if(bouquetList->Bouquets[i]->channelList->getSize() > 0) {
|
||||
if( !bouquetList->Bouquets[i]->channelList->isEmpty() ) {
|
||||
found = true;
|
||||
nNext = i;
|
||||
break;
|
||||
@@ -711,11 +711,11 @@ int CChannelList::show()
|
||||
if (!bouquetList->Bouquets.empty()) {
|
||||
bool found = true;
|
||||
int nNext = (bouquetList->getActiveBouquetNumber()+bouquetList->Bouquets.size()-1) % bouquetList->Bouquets.size();
|
||||
if(bouquetList->Bouquets[nNext]->channelList->getSize() <= 0) {
|
||||
if(bouquetList->Bouquets[nNext]->channelList->isEmpty() ) {
|
||||
found = false;
|
||||
nNext = nNext > 0 ? nNext-1 : bouquetList->Bouquets.size()-1;
|
||||
for(int i = nNext; i > 0; i--) {
|
||||
if(bouquetList->Bouquets[i]->channelList->getSize() > 0) {
|
||||
if(!bouquetList->Bouquets[i]->channelList->isEmpty()) {
|
||||
found = true;
|
||||
nNext = i;
|
||||
break;
|
||||
@@ -1186,7 +1186,7 @@ int CChannelList::numericZap(int key)
|
||||
channelList->addChannel(orgList->chanlist[i]);
|
||||
}
|
||||
}
|
||||
if (channelList->getSize() != 0) {
|
||||
if ( !channelList->isEmpty()) {
|
||||
channelList->adjustToChannelID(orgList->getActiveChannel_ChannelID(), false);
|
||||
this->frameBuffer->paintBackground();
|
||||
res = channelList->exec();
|
||||
@@ -1206,7 +1206,7 @@ int CChannelList::numericZap(int key)
|
||||
if(channel) channelList->addChannel(channel);
|
||||
}
|
||||
}
|
||||
if (channelList->getSize() != 0) {
|
||||
if ( !channelList->isEmpty() ) {
|
||||
this->frameBuffer->paintBackground();
|
||||
res = channelList->exec();
|
||||
CVFD::getInstance()->setMode(CVFD::MODE_TVRADIO);
|
||||
@@ -1968,6 +1968,11 @@ void CChannelList::paint()
|
||||
showChannelLogo();
|
||||
}
|
||||
|
||||
bool CChannelList::isEmpty() const
|
||||
{
|
||||
return this->chanlist.empty();
|
||||
}
|
||||
|
||||
int CChannelList::getSize() const
|
||||
{
|
||||
return this->chanlist.size();
|
||||
|
Reference in New Issue
Block a user