diff options
| author | Felix Domke <tmbinc@elitedvb.net> | 2006-07-10 16:21:51 +0000 |
|---|---|---|
| committer | Felix Domke <tmbinc@elitedvb.net> | 2006-07-10 16:21:51 +0000 |
| commit | cc5126538b58123908717b37816968071d603eb5 (patch) | |
| tree | 5d47d7fe64d504360ab3dd47b0602ba95875e0bc /lib/python/Components/PerServiceDisplay.py | |
| parent | 732961ea798182d334d26e2fa2ce8d91672a932f (diff) | |
| download | enigma2-cc5126538b58123908717b37816968071d603eb5.tar.gz enigma2-cc5126538b58123908717b37816968071d603eb5.zip | |
optionally call callback with event argument
Diffstat (limited to 'lib/python/Components/PerServiceDisplay.py')
| -rw-r--r-- | lib/python/Components/PerServiceDisplay.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/python/Components/PerServiceDisplay.py b/lib/python/Components/PerServiceDisplay.py index 500538c3..a36d4a60 100644 --- a/lib/python/Components/PerServiceDisplay.py +++ b/lib/python/Components/PerServiceDisplay.py @@ -6,12 +6,13 @@ from enigma import iPlayableService from enigma import eLabel, eSlider, eTimer class PerServiceBase(object): - def __init__(self, navcore, eventmap): + def __init__(self, navcore, eventmap, with_event=False): self.eventmap = eventmap self.navcore = navcore self.navcore.event.append(self.event) self.poll_timer = eTimer() self.poll_timer.timeout.get().append(self.poll) + self.with_event = with_event # start with stopped state, so simulate that self.event(iPlayableService.evEnd) @@ -23,7 +24,10 @@ class PerServiceBase(object): # loop up if we need to handle this event if self.eventmap.has_key(ev): # call handler - self.eventmap[ev]() + if self.with_event: + self.eventmap[ev](ev) + else: + self.eventmap[ev]() def enablePolling(self, interval=60000): if interval: |
