diff options
| author | Felix Domke <tmbinc@elitedvb.net> | 2009-05-20 16:56:35 +0200 |
|---|---|---|
| committer | Felix Domke <tmbinc@elitedvb.net> | 2009-05-20 16:56:35 +0200 |
| commit | 57794b7710b06a1dcc156a91c84bb8316f104f06 (patch) | |
| tree | 79bb7e3b7ea98038c0142005b023ca7e4b0728aa /lib | |
| parent | d950a3debddad28a363e840ef0f1da282b3aeaba (diff) | |
| download | enigma2-57794b7710b06a1dcc156a91c84bb8316f104f06.tar.gz enigma2-57794b7710b06a1dcc156a91c84bb8316f104f06.zip | |
support for a final post-destroy value
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/python/Components/Sources/Boolean.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/python/Components/Sources/Boolean.py b/lib/python/Components/Sources/Boolean.py index 212d2198..2364f6d9 100644 --- a/lib/python/Components/Sources/Boolean.py +++ b/lib/python/Components/Sources/Boolean.py @@ -10,10 +10,11 @@ from enigma import eTimer # screen could use your expression, please put your calculation # into a seperate Source, providing a "boolean"-property. class Boolean(Source, object): - def __init__(self, fixed = False, function = None, poll = 0): + def __init__(self, fixed = False, function = None, destroy = None, poll = 0): Source.__init__(self) self.function = function self.fixed = fixed + self.post_destroy = destroy if poll > 0: self.poll_timer = eTimer() self.poll_timer.callback.append(self.poll) @@ -41,4 +42,7 @@ class Boolean(Source, object): def destroy(self): if self.poll_timer: self.poll_timer.callback.remove(self.poll) + if self.post_destroy is not None: + self.fixed = self.post_destroy + self.poll() Source.destroy(self) |
