diff options
| author | Andreas Monzner <andreas.monzner@multimedia-labs.de> | 2008-02-14 19:44:14 +0000 |
|---|---|---|
| committer | Andreas Monzner <andreas.monzner@multimedia-labs.de> | 2008-02-14 19:44:14 +0000 |
| commit | 6f73e6abddf4170357c490966d0e1c622eb376f5 (patch) | |
| tree | 8719ae10ac8803643f273399939d46a9f6fdc19d /lib/python/Screens | |
| parent | 84781c10a768b91a02151b202c76b52b1c5789c2 (diff) | |
| download | enigma2-6f73e6abddf4170357c490966d0e1c622eb376f5.tar.gz enigma2-6f73e6abddf4170357c490966d0e1c622eb376f5.zip | |
add support for cyclic garbage collection to eTimer and eSocketNotifier
class, add simpler method to set a timer callback.. or remove.. instead of
timer.timeout.get().append(func).. or .remove(func)... now it is possible to
do timer.callback.append(func)... timer.callback.remove(func) (the old
method still works..but is now deprecated)
Diffstat (limited to 'lib/python/Screens')
| -rw-r--r-- | lib/python/Screens/ChannelSelection.py | 15 | ||||
| -rw-r--r-- | lib/python/Screens/Ci.py | 2 | ||||
| -rw-r--r-- | lib/python/Screens/EventView.py | 2 | ||||
| -rw-r--r-- | lib/python/Screens/HarddiskSetup.py | 4 | ||||
| -rw-r--r-- | lib/python/Screens/InfoBar.py | 22 | ||||
| -rw-r--r-- | lib/python/Screens/InfoBarGenerics.py | 6 | ||||
| -rw-r--r-- | lib/python/Screens/Ipkg.py | 2 | ||||
| -rw-r--r-- | lib/python/Screens/MessageBox.py | 2 | ||||
| -rw-r--r-- | lib/python/Screens/MovieSelection.py | 4 | ||||
| -rw-r--r-- | lib/python/Screens/ParentalControlSetup.py | 2 | ||||
| -rw-r--r-- | lib/python/Screens/ScanSetup.py | 2 | ||||
| -rw-r--r-- | lib/python/Screens/SubservicesQuickzap.py | 2 | ||||
| -rw-r--r-- | lib/python/Screens/Wizard.py | 2 |
13 files changed, 39 insertions, 28 deletions
diff --git a/lib/python/Screens/ChannelSelection.py b/lib/python/Screens/ChannelSelection.py index e1402aea..d640ac25 100644 --- a/lib/python/Screens/ChannelSelection.py +++ b/lib/python/Screens/ChannelSelection.py @@ -1,28 +1,39 @@ +from Tools.Profile import profile + from Screen import Screen from Components.Button import Button from Components.ServiceList import ServiceList from Components.ActionMap import NumberActionMap, ActionMap, HelpableActionMap from Components.MenuList import MenuList from Components.ServiceEventTracker import ServiceEventTracker +profile("ChannelSelection.py 1") from EpgSelection import EPGSelection from enigma import eServiceReference, eEPGCache, eServiceCenter, eRCInput, eTimer, eDVBDB, iPlayableService, iServiceInformation, getPrevAsciiCode from Components.config import config, ConfigSubsection, ConfigText from Tools.NumericalTextInput import NumericalTextInput +profile("ChannelSelection.py 2") from Components.NimManager import nimmanager +profile("ChannelSelection.py 2.1") from Components.Sources.Source import ObsoleteSource +profile("ChannelSelection.py 2.2") from Components.Sources.RdsDecoder import RdsDecoder +profile("ChannelSelection.py 2.3") from Components.Sources.ServiceEvent import ServiceEvent +profile("ChannelSelection.py 2.4") from Components.Input import Input +profile("ChannelSelection.py 3") from Components.ParentalControl import parentalControl from Components.Pixmap import Pixmap from Screens.InputBox import InputBox, PinInput from Screens.MessageBox import MessageBox from Screens.ServiceInfo import ServiceInfo +profile("ChannelSelection.py 4") from Screens.RdsDisplay import RassInteractive from ServiceReference import ServiceReference from Tools.BoundFunction import boundFunction from re import compile from os import remove +profile("ChannelSelection.py after imports") FLAG_SERVICE_NEW_FOUND = 64 #define in lib/dvb/idvb.h as dxNewFound = 64 @@ -276,7 +287,7 @@ class SelectionEventInfo: self["ServiceEvent"] = ServiceEvent() self.servicelist.connectSelChanged(self.__selectionChanged) self.timer = eTimer() - self.timer.timeout.get().append(self.updateEventInfo) + self.timer.callback.append(self.updateEventInfo) self.onShown.append(self.__selectionChanged) def __selectionChanged(self): @@ -1081,7 +1092,7 @@ class ChannelSelection(ChannelSelectionBase, ChannelSelectionEdit, ChannelSelect }) self.lastChannelRootTimer = eTimer() - self.lastChannelRootTimer.timeout.get().append(self.__onCreate) + self.lastChannelRootTimer.callback.append(self.__onCreate) self.lastChannelRootTimer.start(100,True) self.history_tv = [ ] diff --git a/lib/python/Screens/Ci.py b/lib/python/Screens/Ci.py index 10423ada..5028301e 100644 --- a/lib/python/Screens/Ci.py +++ b/lib/python/Screens/Ci.py @@ -29,7 +29,7 @@ class MMIDialog(Screen): self.slotid = slotid self.timer = eTimer() - self.timer.timeout.get().append(self.keyCancel) + self.timer.callback.append(self.keyCancel) #else the skins fails self["title"] = Label("") diff --git a/lib/python/Screens/EventView.py b/lib/python/Screens/EventView.py index 7746b135..1bb3d0b1 100644 --- a/lib/python/Screens/EventView.py +++ b/lib/python/Screens/EventView.py @@ -22,7 +22,7 @@ class EventViewBase: self["key_red"] = Button("") if similarEPGCB is not None: self.SimilarBroadcastTimer = eTimer() - self.SimilarBroadcastTimer.timeout.get().append(self.getSimilarEvents) + self.SimilarBroadcastTimer.callback.append(self.getSimilarEvents) else: self.SimilarBroadcastTimer = None if self.isRecording: diff --git a/lib/python/Screens/HarddiskSetup.py b/lib/python/Screens/HarddiskSetup.py index 1578fae1..19a674ec 100644 --- a/lib/python/Screens/HarddiskSetup.py +++ b/lib/python/Screens/HarddiskSetup.py @@ -24,10 +24,10 @@ class HarddiskWait(Screen): self.timer = eTimer() if type == HarddiskSetup.HARDDISK_INITIALIZE: text = _("Initializing Harddisk...") - self.timer.timeout.get().append(self.doInit) + self.timer.callback.append(self.doInit) else: text = _("Checking Filesystem...") - self.timer.timeout.get().append(self.doCheck) + self.timer.callback.append(self.doCheck) self["wait"] = Label(text) self.timer.start(100) diff --git a/lib/python/Screens/InfoBar.py b/lib/python/Screens/InfoBar.py index 228ca4ef..80b4239e 100644 --- a/lib/python/Screens/InfoBar.py +++ b/lib/python/Screens/InfoBar.py @@ -2,19 +2,16 @@ from Tools.Profile import profile, profile_final from Screen import Screen -profile("LOAD:MovieSelection") -from Screens.MovieSelection import MovieSelection +profile("LOAD:enigma") +from enigma import iPlayableService + profile("LOAD:ChannelSelectionRadio") from Screens.ChannelSelection import ChannelSelectionRadio +profile("LOAD:MovieSelection") +from Screens.MovieSelection import MovieSelection profile("LOAD:ChoiceBox") from Screens.ChoiceBox import ChoiceBox -profile("LOAD:InitBar_Components") -from Components.Sources.Source import ObsoleteSource -from Components.ActionMap import HelpableActionMap -from Components.config import config -from Components.ServiceEventTracker import ServiceEventTracker - profile("LOAD:InfoBarGenerics") from Screens.InfoBarGenerics import InfoBarShowHide, \ InfoBarNumberZap, InfoBarChannelSelection, InfoBarMenu, InfoBarRdsDecoder, \ @@ -25,12 +22,15 @@ from Screens.InfoBarGenerics import InfoBarShowHide, \ InfoBarSummarySupport, InfoBarMoviePlayerSummarySupport, InfoBarTimeshiftState, InfoBarTeletextPlugin, InfoBarExtensions, \ InfoBarSubtitleSupport, InfoBarPiP, InfoBarPlugins, InfoBarSleepTimer, InfoBarServiceErrorPopupSupport +profile("LOAD:InitBar_Components") +from Components.Sources.Source import ObsoleteSource +from Components.ActionMap import HelpableActionMap +from Components.config import config +from Components.ServiceEventTracker import ServiceEventTracker + profile("LOAD:HelpableScreen") from Screens.HelpMenu import HelpableScreen -profile("LOAD:enigma") -from enigma import iPlayableService - class InfoBar(InfoBarShowHide, InfoBarNumberZap, InfoBarChannelSelection, InfoBarMenu, InfoBarEPG, InfoBarRdsDecoder, InfoBarEvent, InfoBarServiceName, InfoBarInstantRecord, InfoBarAudioSelection, diff --git a/lib/python/Screens/InfoBarGenerics.py b/lib/python/Screens/InfoBarGenerics.py index 28e619fd..b62a466b 100644 --- a/lib/python/Screens/InfoBarGenerics.py +++ b/lib/python/Screens/InfoBarGenerics.py @@ -71,7 +71,7 @@ class InfoBarShowHide: self.__locked = 0 self.hideTimer = eTimer() - self.hideTimer.timeout.get().append(self.doTimerHide) + self.hideTimer.callback.append(self.doTimerHide) self.hideTimer.start(5000, True) self.onShow.append(self.__onShow) @@ -171,7 +171,7 @@ class NumberZap(Screen): }) self.Timer = eTimer() - self.Timer.timeout.get().append(self.keyOK) + self.Timer.callback.append(self.keyOK) self.Timer.start(3000, True) class InfoBarNumberZap: @@ -1018,7 +1018,7 @@ class InfoBarTimeshift: self.timeshift_enabled = 0 self.timeshift_state = 0 self.ts_rewind_timer = eTimer() - self.ts_rewind_timer.timeout.get().append(self.rewindService) + self.ts_rewind_timer.callback.append(self.rewindService) self.__event_tracker = ServiceEventTracker(screen=self, eventmap= { diff --git a/lib/python/Screens/Ipkg.py b/lib/python/Screens/Ipkg.py index 216cf8c8..eac03479 100644 --- a/lib/python/Screens/Ipkg.py +++ b/lib/python/Screens/Ipkg.py @@ -28,7 +28,7 @@ class Ipkg(Screen): self.activity = 0 self.activityTimer = eTimer() - self.activityTimer.timeout.get().append(self.doActivityTimer) + self.activityTimer.callback.append(self.doActivityTimer) #self.activityTimer.start(100, False) self.ipkg = IpkgComponent() diff --git a/lib/python/Screens/MessageBox.py b/lib/python/Screens/MessageBox.py index df276670..51f39877 100644 --- a/lib/python/Screens/MessageBox.py +++ b/lib/python/Screens/MessageBox.py @@ -61,7 +61,7 @@ class MessageBox(Screen): self.timeout = timeout if timeout > 0: self.timer = eTimer() - self.timer.timeout.get().append(self.timerTick) + self.timer.callback.append(self.timerTick) self.onExecBegin.append(self.startTimer) self.origTitle = None if self.execing: diff --git a/lib/python/Screens/MovieSelection.py b/lib/python/Screens/MovieSelection.py index e0bd4ab3..8fb1eb80 100644 --- a/lib/python/Screens/MovieSelection.py +++ b/lib/python/Screens/MovieSelection.py @@ -129,7 +129,7 @@ class SelectionEventInfo: self["Service"] = ServiceEvent() self.list.connectSelChanged(self.__selectionChanged) self.timer = eTimer() - self.timer.timeout.get().append(self.updateEventInfo) + self.timer.callback.append(self.updateEventInfo) self.onShown.append(self.__selectionChanged) def __selectionChanged(self): @@ -156,7 +156,7 @@ class MovieSelection(Screen, HelpableScreen, SelectionEventInfo): self.bouquet_mark_edit = False self.delayTimer = eTimer() - self.delayTimer.timeout.get().append(self.updateHDDData) + self.delayTimer.callback.append(self.updateHDDData) self["waitingtext"] = Label(_("Please wait... Loading list...")) diff --git a/lib/python/Screens/ParentalControlSetup.py b/lib/python/Screens/ParentalControlSetup.py index f5f48e25..6ae12cae 100644 --- a/lib/python/Screens/ParentalControlSetup.py +++ b/lib/python/Screens/ParentalControlSetup.py @@ -148,7 +148,7 @@ class ParentalControlEditor(Screen): self.currentLetter = chr(SPECIAL_CHAR) self.readServiceList() self.chooseLetterTimer = eTimer() - self.chooseLetterTimer.timeout.get().append(self.chooseLetter) + self.chooseLetterTimer.callback.append(self.chooseLetter) self.onLayoutFinish.append(self.LayoutFinished) self["actions"] = NumberActionMap(["DirectionActions", "ColorActions", "OkCancelActions", "NumberActions"], diff --git a/lib/python/Screens/ScanSetup.py b/lib/python/Screens/ScanSetup.py index 2a8c3df7..3e71912b 100644 --- a/lib/python/Screens/ScanSetup.py +++ b/lib/python/Screens/ScanSetup.py @@ -298,7 +298,7 @@ class ScanSetup(ConfigListScreen, Screen, CableTransponderSearchSupport): }, -2) self.statusTimer = eTimer() - self.statusTimer.timeout.get().append(self.updateStatus) + self.statusTimer.callback.append(self.updateStatus) #self.statusTimer.start(5000, True) self.list = [] diff --git a/lib/python/Screens/SubservicesQuickzap.py b/lib/python/Screens/SubservicesQuickzap.py index c0988868..448b4b44 100644 --- a/lib/python/Screens/SubservicesQuickzap.py +++ b/lib/python/Screens/SubservicesQuickzap.py @@ -23,7 +23,7 @@ class SubservicesQuickzap(InfoBarShowHide, InfoBarMenu, InfoBarServiceName, Info self.currentlyPlayingSubservice = 0 self.timer = eTimer() - self.timer.timeout.get().append(self.playSubservice) + self.timer.callback.append(self.playSubservice) self.onLayoutFinish.append(self.onLayoutFinished) self["actions"] = NumberActionMap( [ "InfobarSubserviceQuickzapActions", "NumberActions", "DirectionActions", "ColorActions" ], diff --git a/lib/python/Screens/Wizard.py b/lib/python/Screens/Wizard.py index 1b133152..c987ac61 100644 --- a/lib/python/Screens/Wizard.py +++ b/lib/python/Screens/Wizard.py @@ -162,7 +162,7 @@ class Wizard(Screen, HelpableScreen): self.currStep = 1 self.timeoutTimer = eTimer() - self.timeoutTimer.timeout.get().append(self.timeoutCounterFired) + self.timeoutTimer.callback.append(self.timeoutCounterFired) self["text"] = Label() |
