- 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

@@ -156,7 +156,6 @@ void CEventList::UpdateTimerList(void)
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++) for(uint i= 0; i < timerlist.size(); i++)
{ {
if(timerlist[i].stopTime > starttime-timerPre && timerlist[i].alarmTime < starttime+duration+timerPost) if(timerlist[i].stopTime > starttime-timerPre && timerlist[i].alarmTime < starttime+duration+timerPost)
{ {
@@ -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; t_channel_id channel_tmp = m_showChannel ? evtlist[currpos].channelID : channel_idI;
int timerID = -1; int timerID = -1;
CTimerd::CTimerEventTypes etype = isScheduled(channel_tmp, &evtlist[currpos],&timerID); CTimerd::CTimerEventTypes etype = isScheduled(channel_tmp, &evtlist[currpos],&timerID);
const char * icontype = etype == CTimerd::TIMER_ZAPTO ? NEUTRINO_ICON_MARKER_ZAP : 0; const char *icontype = NULL;
if(etype == CTimerd::TIMER_RECORD){ if (etype == CTimerd::TIMER_ZAPTO)
icontype = NEUTRINO_ICON_MARKER_ZAP;
else if (etype == CTimerd::TIMER_RECORD)
icontype = NEUTRINO_ICON_MARKER_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? 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)) if (timerID > 0 && CRecordManager::getInstance()->CheckRecordingId_if_Timeshift(timerID))
icontype = NEUTRINO_ICON_MARKER_TIMESHIFT; icontype = NEUTRINO_ICON_MARKER_TIMESHIFT;
} }
int iw = 0, ih = 0; int iw = 0, ih = 0;
if(icontype != 0) { if (icontype != NULL)
{
frameBuffer->getIconSize(icontype, &iw, &ih); frameBuffer->getIconSize(icontype, &iw, &ih);
frameBuffer->paintIcon(icontype, x + OFFSET_INNER_MID, ypos + OFFSET_INNER_MIN + smallfont_height, largefont_height); frameBuffer->paintIcon(icontype, x + OFFSET_INNER_MID, ypos + OFFSET_INNER_MIN + smallfont_height, largefont_height);
iw += OFFSET_INNER_MID; iw += OFFSET_INNER_MID;