Fast fix for picviewer; Page up/down change for channel list

git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@388 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
focus
2010-02-20 12:30:22 +00:00
parent 94e257b0c1
commit b5655fb6f4
6 changed files with 26 additions and 9 deletions

View File

@@ -546,8 +546,16 @@ int CChannelList::show()
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 = chanlist.size() - 1;
#endif
if((prev_selected-step) < 0) {
if(prev_selected != 0 && step != 1)
selected = 0;
else
selected = chanlist.size() - 1;
}
paintItem(prev_selected - liststart);
unsigned int oldliststart = liststart;
@@ -569,13 +577,22 @@ int CChannelList::show()
step = ((int) msg == g_settings.key_channelList_pagedown) ? listmaxshow : 1; // browse or step 1
selected += step;
#if 0
if(selected >= chanlist.size()) {
if (((chanlist.size() / listmaxshow) + 1) * listmaxshow == chanlist.size() + listmaxshow) // last page has full entries
selected = 0;
else
selected = ((step == listmaxshow) && (selected < (((chanlist.size() / listmaxshow)+1) * listmaxshow))) ? (chanlist.size() - 1) : 0;
}
#endif
if(selected >= chanlist.size()) {
if((chanlist.size() - listmaxshow -1 < prev_selected) && (prev_selected != (chanlist.size() - 1)) && (step != 1))
selected = chanlist.size() - 1;
else if (((chanlist.size() / listmaxshow) + 1) * listmaxshow == chanlist.size() + listmaxshow) // last page has full entries
selected = 0;
else
selected = ((step == listmaxshow) && (selected < (((chanlist.size() / listmaxshow)+1) * listmaxshow))) ? (chanlist.size() - 1) : 0;
}
paintItem(prev_selected - liststart);
unsigned int oldliststart = liststart;