aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Plugins/Extensions/GraphMultiEPG
diff options
context:
space:
mode:
authorghost <andreas.monzner@multimedia-labs.de>2008-12-03 19:05:33 +0100
committerghost <andreas.monzner@multimedia-labs.de>2008-12-03 19:05:33 +0100
commit1e1b651652e0f46bebc1c803e289fb84de222690 (patch)
treeee4bbbb1f587f78a3ab57c9ff98c4e9b74e02b07 /lib/python/Plugins/Extensions/GraphMultiEPG
parent188224c032f898f7ddbb347839baba65550b5903 (diff)
downloadenigma2-1e1b651652e0f46bebc1c803e289fb84de222690.tar.gz
enigma2-1e1b651652e0f46bebc1c803e289fb84de222690.zip
GraphMultiEpg.py: better readable code (no functional change)
Diffstat (limited to 'lib/python/Plugins/Extensions/GraphMultiEPG')
-rw-r--r--lib/python/Plugins/Extensions/GraphMultiEPG/GraphMultiEpg.py26
1 files changed, 22 insertions, 4 deletions
diff --git a/lib/python/Plugins/Extensions/GraphMultiEPG/GraphMultiEpg.py b/lib/python/Plugins/Extensions/GraphMultiEPG/GraphMultiEpg.py
index aff1c91d..441cb5d8 100644
--- a/lib/python/Plugins/Extensions/GraphMultiEPG/GraphMultiEpg.py
+++ b/lib/python/Plugins/Extensions/GraphMultiEPG/GraphMultiEpg.py
@@ -204,7 +204,13 @@ class EPGList(HTMLComponent, GUIComponent):
def buildEntry(self, service, service_name, events):
r1=self.service_rect
r2=self.event_rect
- res = [ None, MultiContentEntryText(pos = (r1.left(),r1.top()), size = (r1.width(), r1.height()), font = 0, flags = RT_HALIGN_LEFT | RT_VALIGN_CENTER, text = service_name, color = self.foreColorService, backcolor = self.backColorService) ]
+ res = [ None, MultiContentEntryText(
+ pos = (r1.left(),r1.top()),
+ size = (r1.width(), r1.height()),
+ font = 0, flags = RT_HALIGN_LEFT | RT_VALIGN_CENTER,
+ text = service_name,
+ color = self.foreColorService,
+ backcolor = self.backColorService) ]
if events:
start = self.time_base+self.offs*self.time_epoch*60
@@ -222,9 +228,16 @@ class EPGList(HTMLComponent, GUIComponent):
for ev in events: #(event_id, event_title, begin_time, duration)
rec=ev[2] and self.timer.isInTimer(ev[0], ev[2], ev[3], service) > ((ev[3]/10)*8)
xpos, ewidth = self.calcEntryPosAndWidthHelper(ev[2], ev[3], start, end, width)
- res.append(MultiContentEntryText(pos = (left+xpos, top), size = (ewidth, height), font = 1, flags = RT_HALIGN_CENTER | RT_VALIGN_CENTER | RT_WRAP, text = ev[1], color = foreColor, color_sel = foreColorSelected, backcolor = backColor, backcolor_sel = backColorSelected, border_width = 1, border_color = borderColor))
+ res.append(MultiContentEntryText(
+ pos = (left+xpos, top), size = (ewidth, height),
+ font = 1, flags = RT_HALIGN_CENTER | RT_VALIGN_CENTER | RT_WRAP,
+ text = ev[1], color = foreColor, color_sel = foreColorSelected,
+ backcolor = backColor, backcolor_sel = backColorSelected, border_width = 1, border_color = borderColor))
if rec and ewidth > 23:
- res.append(MultiContentEntryPixmapAlphaTest(pos = (left+xpos+ewidth-22, top+height-22), size = (21, 21), png = self.clock_pixmap, backcolor = backColor, backcolor_sel = backColorSelected))
+ res.append(MultiContentEntryPixmapAlphaTest(
+ pos = (left+xpos+ewidth-22, top+height-22), size = (21, 21),
+ png = self.clock_pixmap, backcolor = backColor,
+ backcolor_sel = backColorSelected))
return res
def selEntry(self, dir, visible=True):
@@ -278,8 +291,13 @@ class EPGList(HTMLComponent, GUIComponent):
self.time_base = int(stime)
test = [ (service.ref.toString(), 0, self.time_base, self.time_epoch) for service in services ]
test.insert(0, 'XRnITBD')
+ print "BEFORE:"
+ for x in test:
+ print x
epg_data = self.queryEPG(test)
-
+ print "EPG:"
+ for x in epg_data:
+ print x
self.list = [ ]
tmp_list = None
service = ""