diff options
| author | Andreas Monzner <andreas.monzner@multimedia-labs.de> | 2005-11-11 15:11:09 +0000 |
|---|---|---|
| committer | Andreas Monzner <andreas.monzner@multimedia-labs.de> | 2005-11-11 15:11:09 +0000 |
| commit | 243c568781ee71d742b4e1098cf327592220b29d (patch) | |
| tree | ad53997187127a263cd74a545e8019fdba90844b /lib/components/listboxepg.cpp | |
| parent | 8557c3427743ae6bde13fca80e84d3a4d3bde9bb (diff) | |
| download | enigma2-243c568781ee71d742b4e1098cf327592220b29d.tar.gz enigma2-243c568781ee71d742b4e1098cf327592220b29d.zip | |
change interface of getCurrent method for better use from python
change default font size
Diffstat (limited to 'lib/components/listboxepg.cpp')
| -rw-r--r-- | lib/components/listboxepg.cpp | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/lib/components/listboxepg.cpp b/lib/components/listboxepg.cpp index b72a6a82..d088006b 100644 --- a/lib/components/listboxepg.cpp +++ b/lib/components/listboxepg.cpp @@ -29,12 +29,16 @@ void eListboxEPGContent::setRoot(const eServiceReference &root) } } -void eListboxEPGContent::getCurrent(ePtr<eServiceEvent>& evt) +RESULT eListboxEPGContent::getCurrent(ePtr<eServiceEvent> &evt) { if (cursorValid()) + { evt = *m_cursor; + return 0; + } else evt = 0; + return -1; } void eListboxEPGContent::setElementPosition(int element, eRect where) @@ -151,10 +155,10 @@ void eListboxEPGContent::setSize(const eSize &size) eSize s = m_itemsize; s.setWidth(size.width()/20*5); m_element_position[celBeginTime] = eRect(ePoint(0, 0), s); - m_element_font[celBeginTime] = new gFont("Arial", 20); + m_element_font[celBeginTime] = new gFont("Arial", 22); s.setWidth(size.width()/20*15); m_element_position[celTitle] = eRect(ePoint(size.width()/20*5, 0), s); - m_element_font[celTitle] = new gFont("Arial", 20); + m_element_font[celTitle] = new gFont("Arial", 22); } void eListboxEPGContent::paint(gPainter &painter, eWindowStyle &style, const ePoint &offset, int selected) @@ -178,13 +182,7 @@ void eListboxEPGContent::paint(gPainter &painter, eWindowStyle &style, const ePo { case celBeginTime: { - tm t; - localtime_r(&(*m_cursor)->m_begin, &t); - char tmp[13]; - snprintf(tmp, 13, "%02d.%02d, %02d:%02d", - t.tm_mday, t.tm_mon+1, - t.tm_hour, t.tm_min); - text=tmp; + text=(*m_cursor)->getBeginTimeString(); break; } case celTitle: |
