X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/f15ee3f6cd34e4552f50dcc92a994198ed3b2dfe..86e9af6a8a52226e0dc08430fb4b03291f9de0c7:/lib/service/listboxservice.cpp diff --git a/lib/service/listboxservice.cpp b/lib/service/listboxservice.cpp index 0b2e621c..035658ee 100644 --- a/lib/service/listboxservice.cpp +++ b/lib/service/listboxservice.cpp @@ -2,6 +2,7 @@ #include #include #include +#include void eListboxServiceContent::setRoot(const eServiceReference &root) { @@ -165,7 +166,7 @@ void eListboxServiceContent::sort() DEFINE_REF(eListboxServiceContent); eListboxServiceContent::eListboxServiceContent() - :epgcache(eEPGCache::getInstance()), m_visual_mode(visModeSimple), m_size(0), m_current_marked(false), m_numberoffset(0) + :m_visual_mode(visModeSimple), m_size(0), m_current_marked(false), m_numberoffset(0) { cursorHome(); eServiceCenter::getInstance(m_service_center); @@ -347,7 +348,10 @@ void eListboxServiceContent::paint(gPainter &painter, eWindowStyle &style, const /* get service information */ ePtr service_info; m_service_center->info(*m_cursor, service_info); - + + if (m_is_playable_ignore.valid() && !service_info->isPlayable(*m_cursor, m_is_playable_ignore)) + painter.setForegroundColor(gRGB(0xbbbbbb)); + for (int e = 0; e < celElements; ++e) { if (!m_element_font[e]) @@ -380,8 +384,7 @@ void eListboxServiceContent::paint(gPainter &painter, eWindowStyle &style, const case celServiceInfo: { ePtr evt; - time_t t=-1; - if ( !epgcache->lookupEventTime(*m_cursor, t, evt) ) + if ( !service_info->getEvent(*m_cursor, evt) ) text = '(' + evt->getEventName() + ')'; else continue; @@ -431,3 +434,7 @@ void eListboxServiceContent::paint(gPainter &painter, eWindowStyle &style, const painter.clippop(); } +void eListboxServiceContent::setIgnoreService( const eServiceReference &service ) +{ + m_is_playable_ignore=service; +}