git.cweiske.de
/
enigma2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
avswitch: reset video mode only when it has changed
[enigma2.git]
/
lib
/
python
/
Components
/
PerServiceDisplay.py
diff --git
a/lib/python/Components/PerServiceDisplay.py
b/lib/python/Components/PerServiceDisplay.py
index fe5010528bdd0de3f862e81b06432bf0f29e58b9..23f6ecce6828e18191687262f506e2aae29b8555 100644
(file)
--- a/
lib/python/Components/PerServiceDisplay.py
+++ b/
lib/python/Components/PerServiceDisplay.py
@@
-3,7
+3,7
@@
from VariableText import *
from VariableValue import *
from enigma import iPlayableService
from VariableValue import *
from enigma import iPlayableService
-from enigma import eLabel, eSlider
+from enigma import eLabel, eSlider
, eTimer
class PerServiceDisplay(GUIComponent, VariableText):
"""Mixin for building components which display something which changes on navigation events, for example "service name" """
class PerServiceDisplay(GUIComponent, VariableText):
"""Mixin for building components which display something which changes on navigation events, for example "service name" """
@@
-14,7
+14,9
@@
class PerServiceDisplay(GUIComponent, VariableText):
self.eventmap = eventmap
self.navcore = navcore
self.navcore.event.append(self.event)
self.eventmap = eventmap
self.navcore = navcore
self.navcore.event.append(self.event)
-
+ self.poll_timer = eTimer()
+ self.poll_timer.timeout.get().append(self.poll)
+
# start with stopped state, so simulate that
self.event(iPlayableService.evEnd)
# start with stopped state, so simulate that
self.event(iPlayableService.evEnd)
@@
-29,6
+31,17
@@
class PerServiceDisplay(GUIComponent, VariableText):
g = eLabel(parent)
return g
g = eLabel(parent)
return g
+ def enablePolling(self, interval=60000):
+ if interval:
+ self.poll_timer.start(interval)
+ else:
+ self.poll_timer.stop()
+
+ def disablePolling(self):
+ self.enablePolling(interval=0)
+
+ def poll(self):
+ pass
class PerServiceDisplayProgress(GUIComponent, VariableValue, PerServiceDisplay):
def __init__(self, navcore, eventmap):
class PerServiceDisplayProgress(GUIComponent, VariableValue, PerServiceDisplay):
def __init__(self, navcore, eventmap):
@@
-46,4
+59,3
@@
class PerServiceDisplayProgress(GUIComponent, VariableValue, PerServiceDisplay):
# by default, we use a label to display our data.
self.g = eSlider(parent)
return self.g
# by default, we use a label to display our data.
self.g = eSlider(parent)
return self.g
-
\ No newline at end of file