import ChannelSelection
from ServiceReference import ServiceReference
from Components.config import *
-from Components.ActionMap import NumberActionMap
+from Components.ActionMap import ActionMap, NumberActionMap
from Components.ConfigList import ConfigList
from Components.MenuList import MenuList
from Components.Button import Button
self.list = []
self["config"] = ConfigList(self.list)
- self.createSetup()
+ self.createSetup("config")
def createConfig(self):
config.timerentry = ConfigSubsection()
except:
pass
- def createSetup(self):
+ def createSetup(self, widget):
self.list = []
self.list.append(getConfigListEntry(_("Name"), config.timerentry.name))
self.list.append(getConfigListEntry(_("Description"), config.timerentry.description))
self.channelEntry = getConfigListEntry(_("Channel"), config.timerentry.service)
self.list.append(self.channelEntry)
- self["config"].list = self.list
- self["config"].l.setList(self.list)
+ self[widget].list = self.list
+ self[widget].l.setList(self.list)
def newConfig(self):
- print self["config"].getCurrent()
+ print "newConfig", self["config"].getCurrent()
if self["config"].getCurrent() == self.timerTypeEntry:
- self.createSetup()
+ self.createSetup("config")
if self["config"].getCurrent() == self.frequencyEntry:
- self.createSetup()
+ self.createSetup("config")
def keyLeft(self):
if self["config"].getCurrent() == self.channelEntry:
def getTimestamp(self, date, mytime):
d = time.localtime(date)
dt = datetime.datetime(d.tm_year, d.tm_mon, d.tm_mday, mytime[0], mytime[1])
- print dt
return int(mktime(dt.timetuple()))
def keyGo(self):
def keyCancel(self):
self.close((False,))
-
+
class TimerLog(Screen):
def __init__(self, session, timer):
Screen.__init__(self, session)