from Screen import Screen
-from Components.ActionMap import ActionMap
+from Components.ActionMap import ActionMap, HelpableActionMap
from Components.ActionMap import NumberActionMap
from Components.Label import Label
from Components.config import configfile, configsequencearg
class NumberZap(Screen):
def quit(self):
self.Timer.stop()
- self.close()
+ self.close(0)
def keyOK(self):
self.Timer.stop()
- print "do the action here"
- self.close()
+ self.close(int(self["number"].getText()))
def keyNumberGlobal(self, number):
self.Timer.start(3000) #reset timer
})
def keyNumberGlobal(self, number):
- print "You pressed number " + str(number)
- self.session.open(NumberZap, number)
+# print "You pressed number " + str(number)
+ self.session.openWithCallback(self.numberEntered, NumberZap, number)
+
+ def numberEntered(self, retval):
+# print self.servicelist
+ if retval > 0:
+ self.servicelist.zapToNumber(retval)
class InfoBarChannelSelection:
""" ChannelSelection - handles the channelSelection dialog and the initial
#instantiate forever
self.servicelist = self.session.instantiateDialog(ChannelSelection)
- self["ChannelSelectActions"] = ActionMap( ["InfobarChannelSelection"],
+ self["ChannelSelectActions"] = HelpableActionMap(self, "InfobarChannelSelection",
{
"switchChannelUp": self.switchChannelUp,
"switchChannelDown": self.switchChannelDown,
- "zapUp": self.zapUp,
- "zapDown": self.zapDown,
+ "zapUp": (self.zapUp, _("next channel")),
+ "zapDown": (self.zapDown, _("previous channel")),
})
def switchChannelUp(self):
class InfoBarEPG:
""" EPG - Opens an EPG list when the showEPGList action fires """
def __init__(self):
- self["EPGActions"] = ActionMap( [ "InfobarEPGActions" ],
+ self["EPGActions"] = HelpableActionMap(self, "InfobarEPGActions",
{
- "showEPGList": self.showEPGList,
+ "showEPGList": (self.showEPGList, _("show EPG...")),
})
def showEPGList(self):