mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 16:31:11 +02:00
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:
@@ -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;
|
||||
|
Reference in New Issue
Block a user