X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/cbdae9732240da8ae902936fd8819ffbbae2f1cf..55c37c32a8e3545266d50af73457e9e53932f3de:/lib/python/Components/EpgList.py diff --git a/lib/python/Components/EpgList.py b/lib/python/Components/EpgList.py index 881bf241..26d712e6 100644 --- a/lib/python/Components/EpgList.py +++ b/lib/python/Components/EpgList.py @@ -88,28 +88,27 @@ class EPGList(HTMLComponent, GUIComponent): self.instance = None def recalcEntrySize(self): - t = time() - esize = self.l.getItemSize() - self.l.setFont(0, gFont("Regular", 22)) - self.l.setFont(1, gFont("Regular", 16)) - width = esize.width() - height = esize.height() - if self.type == EPG_TYPE_SINGLE: - w = width/20*5 - self.datetime_rect = Rect(0,0, w, height) - self.descr_rect = Rect(w, 0, width/20*15, height) - else: - xpos = 0; - w = width/10*3; - self.service_rect = Rect(xpos, 0, w-10, height) - xpos += w; - w = width/10*2; - self.start_end_rect = Rect(xpos, 0, w-10, height) - self.progress_rect = Rect(xpos, 4, w-10, height-8) - xpos += w - w = width/10*5; - self.descr_rect = Rect(xpos, 0, width, height) - print "recalcEntrySize", time() - t + if SINGLE_CPP == 0: + esize = self.l.getItemSize() + self.l.setFont(0, gFont("Regular", 22)) + self.l.setFont(1, gFont("Regular", 16)) + width = esize.width() + height = esize.height() + if self.type == EPG_TYPE_SINGLE: + w = width/20*5 + self.datetime_rect = Rect(0,0, w, height) + self.descr_rect = Rect(w, 0, width/20*15, height) + else: + xpos = 0; + w = width/10*3; + self.service_rect = Rect(xpos, 0, w-10, height) + xpos += w; + w = width/10*2; + self.start_end_rect = Rect(xpos, 0, w-10, height) + self.progress_rect = Rect(xpos, 4, w-10, height-8) + xpos += w + w = width/10*5; + self.descr_rect = Rect(xpos, 0, width, height) def buildSingleEntry(self, eventId, beginTime, duration, EventName): r1=self.datetime_rect @@ -185,13 +184,11 @@ class EPGList(HTMLComponent, GUIComponent): test.append((service, direction, begTime)) # self.list = self.queryEPG(test, self.buildMultiEntry) tmp = self.queryEPG(test) - s = len(tmp) - cnt = 0 - while(cnt < s): - x = tmp[cnt] + cnt=0 + for x in tmp: if x[2] is not None: self.list[cnt]=self.buildMultiEntry(x[0], x[1], x[2], x[3], x[4], x[5], x[6]) - cnt += 1 + cnt+=1 self.l.setList(self.list) print time() - t