blob: 67dd2485bd6f7d418f634073adfcaa3a535eb042 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
from Screen import Screen
from Components.BlinkingPixmap import BlinkingPixmapConditional
from Components.Pixmap import Pixmap
from Components.Button import Button
from Components.config import config
from enigma import eDVBSatelliteEquipmentControl
class Dish(Screen):
def __init__(self, session):
Screen.__init__(self, session)
self["Dishpixmap"] = BlinkingPixmapConditional()
self["Dishpixmap"].onVisibilityChange.append(self.DishpixmapVisibilityChanged)
#self["Dishpixmap"] = Pixmap()
config.usage.showdish.addNotifier(self.configChanged)
self.configChanged(config.usage.showdish)
def configChanged(self, configElement):
if not configElement.value:
self["Dishpixmap"].setConnect(lambda: False)
else:
self["Dishpixmap"].setConnect(eDVBSatelliteEquipmentControl.getInstance().isRotorMoving)
def DishpixmapVisibilityChanged(self, state):
if state:
self.show() # show complete screen
else:
self.hide() # hide complete screen
|