+
+ self.onLayoutFinish.append(self.onCreate)
+
+ def nextBouquet(self):
+ if self.bouquetChangeCB:
+ self.bouquetChangeCB(1, self)
+
+ def prevBouquet(self):
+ if self.bouquetChangeCB:
+ self.bouquetChangeCB(-1, self)
+
+ def enterDateTime(self):
+ if self.type == EPG_TYPE_MULTI:
+ global mepg_config_initialized
+ if not mepg_config_initialized:
+ config.misc.prev_mepg_time=ConfigClock(default = time())
+ mepg_config_initialized = True
+ self.session.openWithCallback(self.onDateTimeInputClosed, TimeDateInput, config.misc.prev_mepg_time )
+
+ def onDateTimeInputClosed(self, ret):
+ if len(ret) > 1:
+ if ret[0]:
+ self.ask_time=ret[1]
+ self["list"].fillMultiEPG(self.services, ret[1])
+
+ def closeScreen(self):
+ self.close(self.closeRecursive)
+
+ def infoKeyPressed(self):
+ cur = self["list"].getCurrent()
+ event = cur[0]
+ service = cur[1]
+ if event is not None:
+ if self.type != EPG_TYPE_SIMILAR:
+ self.session.open(EventViewSimple, event, service, self.eventViewCallback, self.openSimilarList)
+ else:
+ self.session.open(EventViewSimple, event, service, self.eventViewCallback)
+
+ def openSimilarList(self, eventid, refstr):
+ self.session.open(EPGSelection, refstr, None, eventid)
+
+ def setServices(self, services):
+ self.services = services
+ self.onCreate()
+
+ #just used in multipeg
+ def onCreate(self):
+ l = self["list"]
+ l.recalcEntrySize()
+ if self.type == EPG_TYPE_MULTI:
+ l.fillMultiEPG(self.services, self.ask_time)
+ elif self.type == EPG_TYPE_SINGLE:
+ l.fillSingleEPG(self.currentService)
+ else:
+ l.fillSimilarList(self.currentService, self.eventid)
+
+ def eventViewCallback(self, setEvent, setService, val):
+ l = self["list"]
+ old = l.getCurrent()
+ if val == -1:
+ self.moveUp()
+ elif val == +1:
+ self.moveDown()
+ cur = l.getCurrent()
+ if self.type == EPG_TYPE_MULTI and cur[0] is None and cur[1].ref != old[1].ref:
+ self.eventViewCallback(setEvent, setService, val)
+ else:
+ setService(cur[1])
+ setEvent(cur[0])
+
+ def zapTo(self): # just used in multiepg
+ if self.zapFunc and self["key_red"].getText() == "Zap":
+ lst = self["list"]
+ count = lst.getCurrentChangeCount()
+ if count == 0:
+ self.closeRecursive = True
+ ref = lst.getCurrent()[1]
+ self.zapFunc(ref.ref)