mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-30 08:51:04 +02:00
neutrino eventlist: rework manage painting of function bar
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-beta@1789 e54a6e83-5905-42d5-8d5c-058d10e6a962
Origin commit data
------------------
Branch: ni/coolstream
Commit: 565cfcb8ca
Author: Thilo Graf <dbt@novatux.de>
Date: 2011-10-29 (Sat, 29 Oct 2011)
Origin message was:
------------------
*neutrino eventlist: rework manage painting of function bar
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-beta@1789 e54a6e83-5905-42d5-8d5c-058d10e6a962
------------------
This commit was generated by Migit
This commit is contained in:
@@ -335,64 +335,54 @@ int EventList::exec(const t_channel_id channel_id, const std::string& channelnam
|
|||||||
} else
|
} else
|
||||||
loop = false;
|
loop = false;
|
||||||
}
|
}
|
||||||
if (msg == CRCInput::RC_up || (int) msg == g_settings.key_channelList_pageup)
|
|
||||||
|
//manage painting of function bar during scrolling, depends of timerevent types
|
||||||
|
if (msg == CRCInput::RC_up || (int) msg == g_settings.key_channelList_pageup ||
|
||||||
|
msg == CRCInput::RC_down || (int) msg == g_settings.key_channelList_pagedown)
|
||||||
{
|
{
|
||||||
|
bool paint_buttonbar = false; //function bar
|
||||||
int step = 0;
|
int step = 0;
|
||||||
int prev_selected = selected;
|
int prev_selected = selected;
|
||||||
|
|
||||||
step = ((int) msg == g_settings.key_channelList_pageup) ? listmaxshow : 1; // browse or step 1
|
|
||||||
selected -= step;
|
|
||||||
if((prev_selected-step) < 0) // because of uint
|
|
||||||
selected = evtlist.size() - 1;
|
|
||||||
|
|
||||||
paintItem(prev_selected - liststart, channel_id);
|
|
||||||
unsigned int oldliststart = liststart;
|
|
||||||
liststart = (selected/listmaxshow)*listmaxshow;
|
|
||||||
|
|
||||||
if(oldliststart!=liststart)
|
|
||||||
paint(channel_id);
|
|
||||||
else
|
|
||||||
paintItem(selected - liststart, channel_id);
|
|
||||||
|
|
||||||
if ((g_settings.key_channelList_addremind != CRCInput::RC_nokey) ||
|
if ((g_settings.key_channelList_addremind != CRCInput::RC_nokey) ||
|
||||||
((g_settings.recording_type != CNeutrinoApp::RECORDING_OFF) &&
|
((g_settings.recording_type != CNeutrinoApp::RECORDING_OFF) &&
|
||||||
(g_settings.key_channelList_addrecord != CRCInput::RC_nokey)))
|
(g_settings.key_channelList_addrecord != CRCInput::RC_nokey)))
|
||||||
{
|
{
|
||||||
showFunctionBar(true, channel_id);
|
paint_buttonbar = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (msg == CRCInput::RC_up || (int) msg == g_settings.key_channelList_pageup)
|
||||||
|
{
|
||||||
|
step = ((int) msg == g_settings.key_channelList_pageup) ? listmaxshow : 1; // browse or step 1
|
||||||
|
selected -= step;
|
||||||
|
if((prev_selected-step) < 0) // because of uint
|
||||||
|
selected = evtlist.size() - 1;
|
||||||
}
|
}
|
||||||
else if (msg == CRCInput::RC_down || (int) msg == g_settings.key_channelList_pagedown)
|
else if (msg == CRCInput::RC_down || (int) msg == g_settings.key_channelList_pagedown)
|
||||||
{
|
{
|
||||||
unsigned int step = 0;
|
|
||||||
int prev_selected = selected;
|
|
||||||
|
|
||||||
step = ((int) msg == g_settings.key_channelList_pagedown) ? listmaxshow : 1; // browse or step 1
|
step = ((int) msg == g_settings.key_channelList_pagedown) ? listmaxshow : 1; // browse or step 1
|
||||||
selected += step;
|
selected += step;
|
||||||
|
|
||||||
if(selected >= evtlist.size()) {
|
if(selected >= evtlist.size())
|
||||||
|
{
|
||||||
if (((evtlist.size() / listmaxshow) + 1) * listmaxshow == evtlist.size() + listmaxshow) // last page has full entries
|
if (((evtlist.size() / listmaxshow) + 1) * listmaxshow == evtlist.size() + listmaxshow) // last page has full entries
|
||||||
selected = 0;
|
selected = 0;
|
||||||
else
|
else
|
||||||
selected = ((step == listmaxshow) && (selected < (((evtlist.size() / listmaxshow) + 1) * listmaxshow))) ? (evtlist.size() - 1) : 0;
|
selected = ((step == listmaxshow) && (selected < (((evtlist.size() / listmaxshow) + 1) * listmaxshow))) ? (evtlist.size() - 1) : 0;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
paintItem(prev_selected - liststart, channel_id);
|
paintItem(prev_selected - liststart, channel_id);
|
||||||
unsigned int oldliststart = liststart;
|
unsigned int oldliststart = liststart;
|
||||||
liststart = (selected/listmaxshow)*listmaxshow;
|
liststart = (selected/listmaxshow)*listmaxshow;
|
||||||
|
|
||||||
if(oldliststart!=liststart)
|
if(oldliststart!=liststart)
|
||||||
paint(channel_id);
|
paint(channel_id);
|
||||||
else
|
else
|
||||||
paintItem(selected - liststart, channel_id);
|
paintItem(selected - liststart, channel_id);
|
||||||
|
|
||||||
if ((g_settings.key_channelList_addremind != CRCInput::RC_nokey) ||
|
showFunctionBar(paint_buttonbar, channel_id);
|
||||||
((g_settings.recording_type != CNeutrinoApp::RECORDING_OFF) &&
|
|
||||||
(g_settings.key_channelList_addrecord != CRCInput::RC_nokey)))
|
|
||||||
{
|
|
||||||
showFunctionBar(true, channel_id);
|
|
||||||
}
|
}
|
||||||
}
|
//sort
|
||||||
|
|
||||||
else if (msg == (neutrino_msg_t)g_settings.key_channelList_sort)
|
else if (msg == (neutrino_msg_t)g_settings.key_channelList_sort)
|
||||||
{
|
{
|
||||||
uint64_t selected_id = evtlist[selected].eventID;
|
uint64_t selected_id = evtlist[selected].eventID;
|
||||||
|
Reference in New Issue
Block a user