mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-30 00:41:09 +02:00
Fixes for non-standart icon sizes. Not complete yet, work in progress. Probably will broke commit #568
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@569 e54a6e83-5905-42d5-8d5c-058d10e6a962
Origin commit data
------------------
Branch: ni/coolstream
Commit: 56674d5561
Author: [CST] Focus <focus.cst@gmail.com>
Date: 2010-05-06 (Thu, 06 May 2010)
------------------
This commit was generated by Migit
This commit is contained in:
@@ -181,9 +181,18 @@ int CListBox::exec(CMenuTarget* parent, const std::string & /*actionKey*/)
|
||||
|
||||
step = ((int) msg == g_settings.key_channelList_pageup) ? listmaxshow : 1; // browse or step 1
|
||||
selected -= step;
|
||||
|
||||
if((prev_selected-step) < 0) {
|
||||
if(prev_selected != 0 && step != 1)
|
||||
selected = 0;
|
||||
else
|
||||
selected = getItemCount() - 1;
|
||||
}
|
||||
|
||||
#if 0
|
||||
if((prev_selected-step) < 0) // because of uint
|
||||
selected = getItemCount() - 1;
|
||||
|
||||
#endif
|
||||
paintItem(prev_selected - liststart);
|
||||
unsigned int oldliststart = liststart;
|
||||
liststart = (selected/listmaxshow)*listmaxshow;
|
||||
@@ -198,17 +207,28 @@ int CListBox::exec(CMenuTarget* parent, const std::string & /*actionKey*/)
|
||||
{
|
||||
if(getItemCount()!=0) {
|
||||
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(selected >= getItemCount()) {
|
||||
if((getItemCount() - listmaxshow -1 < prev_selected) && (prev_selected != (getItemCount() - 1)) && (step != 1))
|
||||
selected = getItemCount() - 1;
|
||||
else if (((getItemCount() / listmaxshow) + 1) * listmaxshow == getItemCount() + listmaxshow) // last page has full entries
|
||||
selected = 0;
|
||||
else
|
||||
selected = ((step == listmaxshow) && (selected < (((getItemCount() / listmaxshow)+1) * listmaxshow))) ? (getItemCount() - 1) : 0;
|
||||
}
|
||||
|
||||
#if 0
|
||||
if(selected >= getItemCount()) {
|
||||
if (((getItemCount() / listmaxshow) + 1) * listmaxshow == getItemCount() + listmaxshow) // last page has full entries
|
||||
selected = 0;
|
||||
else
|
||||
selected = ((step == listmaxshow) && (selected < (((getItemCount() / listmaxshow) + 1) * listmaxshow))) ? (getItemCount() - 1) : 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
paintItem(prev_selected - liststart);
|
||||
unsigned int oldliststart = liststart;
|
||||
|
Reference in New Issue
Block a user