diff options
| author | Stefan Pluecken <stefan.pluecken@multimedia-labs.de> | 2005-11-10 01:23:39 +0000 |
|---|---|---|
| committer | Stefan Pluecken <stefan.pluecken@multimedia-labs.de> | 2005-11-10 01:23:39 +0000 |
| commit | 93fe9a37c89cbb2c4ea31808bf3196b1603ad234 (patch) | |
| tree | 6c0d667ba70e919df51cff0579fc38797b4b38e4 /lib/python | |
| parent | 59efe28a00e5713ad5279ed976430da31292a129 (diff) | |
| download | enigma2-93fe9a37c89cbb2c4ea31808bf3196b1603ad234.tar.gz enigma2-93fe9a37c89cbb2c4ea31808bf3196b1603ad234.zip | |
volume-control:
move volumeBar from infobar to a single screen Volume
timer:
change input type of configelement for start- and endtime
Diffstat (limited to 'lib/python')
| -rw-r--r-- | lib/python/Components/config.py | 3 | ||||
| -rw-r--r-- | lib/python/Screens/InfoBar.py | 22 | ||||
| -rw-r--r-- | lib/python/Screens/TimerEntry.py | 22 |
3 files changed, 34 insertions, 13 deletions
diff --git a/lib/python/Components/config.py b/lib/python/Components/config.py index bdd08e12..b5a767a2 100644 --- a/lib/python/Components/config.py +++ b/lib/python/Components/config.py @@ -154,6 +154,9 @@ class configSequenceArg: # configsequencearg.get ("MAC") if (type == "MAC"): return ((":"), [(1,255),(1,255),(1,255),(1,255),(1,255),(1,255)], "") + # configsequencearg.get ("CLOCK") + if (type == "CLOCK"): + return ((":"), [(0,23),(0,59)], "") # configsequencearg.get("INTEGER", (min, max)) => x with min <= x <= max if (type == "INTEGER"): return ((":"), [args], "") diff --git a/lib/python/Screens/InfoBar.py b/lib/python/Screens/InfoBar.py index 73825f25..b837c531 100644 --- a/lib/python/Screens/InfoBar.py +++ b/lib/python/Screens/InfoBar.py @@ -1,7 +1,6 @@ from Screen import Screen from ChannelSelection import ChannelSelection from Components.Clock import Clock -from Components.VolumeBar import VolumeBar from Components.ActionMap import ActionMap from Components.Button import Button from Components.ServiceName import ServiceName @@ -11,6 +10,7 @@ from Components.config import configfile from Screens.MessageBox import MessageBox from Screens.MovieSelection import MovieSelection +from Screens.Volume import Volume from enigma import * @@ -30,10 +30,11 @@ class InfoBar(Screen): #instantiate forever self.servicelist = self.session.instantiateDialog(ChannelSelection) - self.volumeBar = VolumeBar() self.state = self.STATE_HIDDEN + self.volumeDialog = self.session.instantiateDialog(Volume) + self.hideTimer = eTimer() self.hideTimer.timeout.get().append(self.doTimerHide) #self.hideTimer.start(1000) @@ -61,8 +62,6 @@ class InfoBar(Screen): # ServicePosition(self.session.nav, ServicePosition.TYPE_REMAINING) # Clock() - self["Volume"] = self.volumeBar - self["ServiceName"] = ServiceName(self.session.nav) self["Event_Now"] = EventInfo(self.session.nav, EventInfo.Now) @@ -120,12 +119,23 @@ class InfoBar(Screen): def volUp(self): eDVBVolumecontrol.getInstance().volumeUp() - self.volumeBar.setValue(eDVBVolumecontrol.getInstance().getVolume()) + self.volumeDialog.instance.show() + #self.volumeDialog.instance.setValue(eDVBVolumecontrol.getInstance().getVolume()) + self.hideVolTimer = eTimer() + self.hideVolTimer.timeout.get().append(self.volHide) + self.hideVolTimer.start(3000) def volDown(self): eDVBVolumecontrol.getInstance().volumeDown() - self.volumeBar.setValue(eDVBVolumecontrol.getInstance().getVolume()) + #self.volumeDialog.instance.volumeBar.setValue(eDVBVolumecontrol.getInstance().getVolume()) + self.volumeDialog.instance.show() + self.hideVolTimer = eTimer() + self.hideVolTimer.timeout.get().append(self.volHide) + self.hideVolTimer.start(3000) + def volHide(self): + self.volumeDialog.instance.hide() + def startShow(self): self.instance.m_animation.startMoveAnimation(ePoint(0, 600), ePoint(0, 380), 100) self.state = self.STATE_SHOWN diff --git a/lib/python/Screens/TimerEntry.py b/lib/python/Screens/TimerEntry.py index 5893749b..c61e9ab3 100644 --- a/lib/python/Screens/TimerEntry.py +++ b/lib/python/Screens/TimerEntry.py @@ -39,19 +39,27 @@ class TimerEntry(Screen): def createConfig(self, timer): config.timerentry = ConfigSubsection() + config.timerentry.type = configElement_nonSave("config.timerentry.type", configSelection, 0, ("once", "repeated")) config.timerentry.startdate = configElement_nonSave("config.timerentry.startdate", configDateTime, timer.begin, ("%d.%B %Y", 86400)) - config.timerentry.starttime = configElement_nonSave("config.timerentry.starttime", configDateTime, timer.begin, ("%H:%M", 60)) + config.timerentry.starttime = configElement_nonSave("config.timerentry.starttime", configSequence, [int(strftime("%H", localtime(timer.begin))), int(strftime("%M", localtime(timer.begin)))], configsequencearg.get("CLOCK")) + #config.timerentry.starttime = configElement_nonSave("config.timerentry.starttime", configDateTime, timer.begin, ("%H:%M", 60)) config.timerentry.enddate = configElement_nonSave("config.timerentry.enddate", configDateTime, timer.end, ("%d.%B %Y", 86400)) - config.timerentry.endtime = configElement_nonSave("config.timerentry.endtime", configDateTime, timer.end, ("%H:%M", 60)) + config.timerentry.endtime = configElement_nonSave("config.timerentry.endtime", configSequence, [int(strftime("%H", localtime(timer.end))), int(strftime("%M", localtime(timer.end)))], configsequencearg.get("CLOCK")) +# config.timerentry.endtime = configElement_nonSave("config.timerentry.endtime", configDateTime, timer.end, ("%H:%M", 60)) #config.timerentry.weekday = configElement_nonSave("config.timerentry.weekday", configDateTime, time(), ("%A", 86400)) def createSetup(self): self.list = [] + self.list.append(getConfigListEntry("TimerType", config.timerentry.type)) - self.list.append(getConfigListEntry("StartDate", config.timerentry.startdate)) - self.list.append(getConfigListEntry("StartTime", config.timerentry.starttime)) - self.list.append(getConfigListEntry("EndDate", config.timerentry.enddate)) - self.list.append(getConfigListEntry("EndTime", config.timerentry.endtime)) + if (config.timerentry.type.value == 0): + self.list.append(getConfigListEntry("StartDate", config.timerentry.startdate)) + self.list.append(getConfigListEntry("StartTime", config.timerentry.starttime)) + self.list.append(getConfigListEntry("EndDate", config.timerentry.enddate)) + self.list.append(getConfigListEntry("EndTime", config.timerentry.endtime)) + else: + pass + #self.list.append(getConfigListEntry("StartDate", config.timerentry.startdate)) # self.list.append(getConfigListEntry("Weekday", config.timerentry.weekday)) self["config"].list = self.list @@ -59,7 +67,7 @@ class TimerEntry(Screen): def newConfig(self): print self["config"].getCurrent() - if self["config"].getCurrent()[0] == "Type of scan": + if self["config"].getCurrent()[0] == "TimerType": self.createSetup() if self["config"].getCurrent()[0] == "Tuner": self.createSetup() |
