Experimental fastscan for CD/TVV/Telesat providers

git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@456 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
focus
2010-03-05 11:40:49 +00:00
parent a5766a7ccf
commit 7a2ec6efed
14 changed files with 749 additions and 18 deletions

View File

@@ -385,8 +385,16 @@ int CBouquetList::show(bool bShowChannelList)
step = ((int) msg == g_settings.key_channelList_pageup) ? listmaxshow : 1; // browse or step 1
selected -= step;
#if 0
if((prev_selected-step) < 0) // because of uint
selected = Bouquets.size()-1;
#endif
if((prev_selected-step) < 0) {
if(prev_selected != 0 && step != 1)
selected = 0;
else
selected = Bouquets.size() - 1;
}
paintItem(prev_selected - liststart);
unsigned int oldliststart = liststart;
@@ -399,17 +407,27 @@ int CBouquetList::show(bool bShowChannelList)
else if (msg == CRCInput::RC_down || (int) msg == g_settings.key_channelList_pagedown)
{
unsigned int step = 0;
int prev_selected = selected;
unsigned int prev_selected = selected;
step = ((int) msg == g_settings.key_channelList_pagedown) ? listmaxshow : 1; // browse or step 1
selected += step;
#if 0
if(selected >= Bouquets.size()) {
if (((Bouquets.size() / listmaxshow) + 1) * listmaxshow == Bouquets.size() + listmaxshow) // last page has full entries
selected = 0;
else
selected = ((step == listmaxshow) && (selected < (((Bouquets.size() / listmaxshow) + 1) * listmaxshow))) ? (Bouquets.size() - 1) : 0;
}
#endif
if(selected >= Bouquets.size()) {
if((Bouquets.size() - listmaxshow -1 < prev_selected) && (prev_selected != (Bouquets.size() - 1)) && (step != 1))
selected = Bouquets.size() - 1;
else if (((Bouquets.size() / listmaxshow) + 1) * listmaxshow == Bouquets.size() + listmaxshow) // last page has full entries
selected = 0;
else
selected = ((step == listmaxshow) && (selected < (((Bouquets.size() / listmaxshow)+1) * listmaxshow))) ? (Bouquets.size() - 1) : 0;
}
paintItem(prev_selected - liststart);
unsigned int oldliststart = liststart;
liststart = (selected/listmaxshow)*listmaxshow;