epglist is now working
authorAndreas Monzner <andreas.monzner@multimedia-labs.de>
Thu, 10 Nov 2005 21:25:52 +0000 (21:25 +0000)
committerAndreas Monzner <andreas.monzner@multimedia-labs.de>
Thu, 10 Nov 2005 21:25:52 +0000 (21:25 +0000)
data/skin.xml
lib/components/listboxepg.cpp
lib/dvb/epgcache.cpp

index 21f735b..cc066f7 100644 (file)
                        <widget name="key_yellow" position="280,0" size="140,40" backgroundColor="yellow" font="Arial;21" />
                        <widget name="key_blue" position="420,0" size="140,40" backgroundColor="blue" font="Arial;21" />
                </screen>
-               <screen name="MovieSelection" position="150,100" size="400,420" title="Select-a-movie">
+               <screen name="EPGSelection" position="90,100" size="560,400" title="EPG Selection">
+                       <widget name="list" position="0,0" size="560,400" />
+               </screen>
+               <screen name="MovieSelection" position="150,100" size="400,420" title="Select-a-movie">
                        <widget name="list" position="0,50" size="400,300" />
                        <widget name="freeDiskSpace" position="0,360" size="400,40" />
                </screen>
index a8edd28..b72a6a8 100644 (file)
@@ -11,10 +11,15 @@ void eListboxEPGContent::setRoot(const eServiceReference &root)
                m_root = root;
 
                epg->Lock();
-               epg->startTimeQuery(root);
-               ePtr<eServiceEvent> ptr;
-               while( !epg->getNextTimeEntry(ptr) )
-                       m_list.push_back(ptr);
+               if (!epg->startTimeQuery(root))
+               {
+                       ePtr<eServiceEvent> ptr;
+                       while( !epg->getNextTimeEntry(ptr) )
+                               m_list.push_back(ptr);
+               }
+               else
+                       eDebug("startTimeQuery failed %s", root.toString().c_str());
+               epg->Unlock();
 
                m_size = m_list.size();
                cursorHome();
@@ -144,12 +149,12 @@ void eListboxEPGContent::setSize(const eSize &size)
 {
        m_itemsize = size;
        eSize s = m_itemsize;
-       s.setWidth((size.width()/4)-10);
+       s.setWidth(size.width()/20*5);
        m_element_position[celBeginTime] = eRect(ePoint(0, 0), s);
-       m_element_font[celBeginTime] = new gFont("Arial", 14);
-       s.setWidth(size.width()/4*3);
-       m_element_position[celTitle] = eRect(ePoint(size.width()/4, 0), s);
-       m_element_font[celTitle] = new gFont("Arial", 14);
+       m_element_font[celBeginTime] = new gFont("Arial", 20);
+       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);
 }
 
 void eListboxEPGContent::paint(gPainter &painter, eWindowStyle &style, const ePoint &offset, int selected)
index d7515b1..7b94a1a 100644 (file)
@@ -1153,6 +1153,8 @@ RESULT eEPGCache::startTimeQuery(const eServiceReference &service, time_t begin,
                                        m_timemap_cursor = it;
                        }
                }
+               else
+                       m_timemap_cursor = It->second.second.begin();
                return 0;
        }
        return -1;