+ if cur[1] is None:
+ self["Service"].newService(None)
+ else:
+ self["Service"].newService(cur[1].ref)
+
+ if cur[1] is None or cur[1].getServiceName() == "":
+ if self.key_green_choice != self.EMPTY:
+ self["key_green"].setText("")
+ self.key_green_choice = self.EMPTY
+ if self.key_red_choice != self.EMPTY:
+ self["key_red"].setText("")
+ self.key_red_choice = self.EMPTY
+ return
+ elif self.key_red_choice != self.ZAP and self.type == EPG_TYPE_MULTI:
+ self["key_red"].setText("Zap")
+ self.key_red_choice = self.ZAP
+
+ if event is None:
+ if self.key_green_choice != self.EMPTY:
+ self["key_green"].setText("")
+ self.key_green_choice = self.EMPTY
+ return
+
+ serviceref = cur[1]
+ eventid = event.getEventId()
+ refstr = serviceref.ref.toString()
+ isRecordEvent = False
+ for timer in self.session.nav.RecordTimer.timer_list:
+ if timer.eit == eventid and timer.service_ref.ref.toString() == refstr:
+ isRecordEvent = True
+ break
+ if isRecordEvent and self.key_green_choice != self.REMOVE_TIMER:
+ self["key_green"].setText(_("Remove timer"))
+ self.key_green_choice = self.REMOVE_TIMER
+ elif not isRecordEvent and self.key_green_choice != self.ADD_TIMER:
+ self["key_green"].setText(_("Add timer"))
+ self.key_green_choice = self.ADD_TIMER