git.cweiske.de
/
enigma2.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
d950a3d
)
support for a final post-destroy value
author
Felix Domke
<tmbinc@elitedvb.net>
Wed, 20 May 2009 14:56:35 +0000
(16:56 +0200)
committer
Felix Domke
<tmbinc@elitedvb.net>
Wed, 20 May 2009 14:56:35 +0000
(16:56 +0200)
lib/python/Components/Sources/Boolean.py
patch
|
blob
|
history
diff --git
a/lib/python/Components/Sources/Boolean.py
b/lib/python/Components/Sources/Boolean.py
index 212d2198600397fd35bf198cff2faa306fd6470f..2364f6d97ce2a7448588965357f880cb06e20271 100644
(file)
--- 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):
# 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
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)
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)
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)
Source.destroy(self)