factor out loadPNG into generic LoadPixmap
[enigma2.git] / lib / python / Plugins / Extensions / GraphMultiEPG / GraphMultiEpg.py
index 49297032f41df98c2d435bcb2fa443dc0dd8333e..d6d27595e69104db3d44b467a1d434f3bd77c06b 100644 (file)
@@ -17,7 +17,8 @@ from Screens.EpgSelection import EPGSelection
 from Tools.Directories import resolveFilename, SCOPE_SKIN_IMAGE
 from RecordTimer import RecordTimerEntry, parseEvent
 from ServiceReference import ServiceReference
-from enigma import eEPGCache, eListbox, gFont, loadPNG, eListboxPythonMultiContent, \
+from Tools.LoadPixmap import LoadPixmap
+from enigma import eEPGCache, eListbox, gFont, eListboxPythonMultiContent, \
        RT_HALIGN_LEFT, RT_HALIGN_CENTER, RT_VALIGN_CENTER, RT_WRAP, eRect, eTimer
 
 from time import localtime, time, strftime
@@ -38,7 +39,7 @@ class EPGList(HTMLComponent, GUIComponent):
                if overjump_empty:
                        self.l.setSelectableFunc(self.isSelectable)
                self.epgcache = eEPGCache.getInstance()
-               self.clock_pixmap = loadPNG(resolveFilename(SCOPE_SKIN_IMAGE, 'epgclock-fs8.png'))
+               self.clock_pixmap = LoadPixmap(resolveFilename(SCOPE_SKIN_IMAGE, 'epgclock-fs8.png'))
                self.time_base = None
                self.time_epoch = time_epoch
                self.list = None
@@ -218,7 +219,7 @@ class EPGList(HTMLComponent, GUIComponent):
                                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))
                                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_selected = 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):