- eventlist: small code formatting changes

Signed-off-by: Thilo Graf <dbt@novatux.de>
This commit is contained in:
svenhoefer
2019-04-25 22:40:11 +02:00
committed by Thilo Graf
parent 198c427f1e
commit 24a57934cc

View File

@@ -153,10 +153,9 @@ void CEventList::UpdateTimerList(void)
// Function: HasTimerConflicts
// search for timer conflicts for given time
// return: true if found any conflict, you can watch with parameter epg_ID
bool CEventList::HasTimerConflicts(time_t starttime, time_t duration, event_id_t * epg_ID)
bool CEventList::HasTimerConflicts(time_t starttime, time_t duration, event_id_t *epg_ID)
{
for(uint i= 0; i < timerlist.size(); i++)
{
if(timerlist[i].stopTime > starttime-timerPre && timerlist[i].alarmTime < starttime+duration+timerPost)
{
@@ -166,7 +165,7 @@ bool CEventList::HasTimerConflicts(time_t starttime, time_t duration, event_id_t
}
*epg_ID = 0;
return false;
return false;
}
void CEventList::readEvents(const t_channel_id channel_id)
@@ -797,17 +796,21 @@ void CEventList::paintItem(unsigned int pos, t_channel_id channel_idI)
t_channel_id channel_tmp = m_showChannel ? evtlist[currpos].channelID : channel_idI;
int timerID = -1;
CTimerd::CTimerEventTypes etype = isScheduled(channel_tmp, &evtlist[currpos],&timerID);
const char * icontype = etype == CTimerd::TIMER_ZAPTO ? NEUTRINO_ICON_MARKER_ZAP : 0;
if(etype == CTimerd::TIMER_RECORD){
const char *icontype = NULL;
if (etype == CTimerd::TIMER_ZAPTO)
icontype = NEUTRINO_ICON_MARKER_ZAP;
else if (etype == CTimerd::TIMER_RECORD)
icontype = NEUTRINO_ICON_MARKER_RECORD;
}else if (etype == CTimerd::TIMER_REMOTEBOX){
else if (etype == CTimerd::TIMER_REMOTEBOX)
icontype = NEUTRINO_ICON_MARKER_RECORD_GRAY; // do we need another icon for remote timers?
}else{
else
{
if (timerID > 0 && CRecordManager::getInstance()->CheckRecordingId_if_Timeshift(timerID))
icontype = NEUTRINO_ICON_MARKER_TIMESHIFT;
}
int iw = 0, ih = 0;
if(icontype != 0) {
if (icontype != NULL)
{
frameBuffer->getIconSize(icontype, &iw, &ih);
frameBuffer->paintIcon(icontype, x + OFFSET_INNER_MID, ypos + OFFSET_INNER_MIN + smallfont_height, largefont_height);
iw += OFFSET_INNER_MID;