bb38da106ba675c19fd95f8e793eeaa666e250d9
[enigma2.git] / lib / python / Screens / Standby.py
1 from Screen import Screen
2 from Components.ActionMap import ActionMap
3 from enigma import *
4
5 class Standby(Screen):
6         def Power(self):
7                 print "leave standby"
8                 #start last played service
9                 eAVSwitch.getInstance().setInput(0)
10                 self.infobar.servicelist.zap()
11                 self.leaveMute()
12                 self.close()
13
14         def setMute(self):
15                 if (eDVBVolumecontrol.getInstance().isMuted()):
16                         self.wasMuted = 1
17                         print "mute already active"
18                 else:   
19                         self.wasMuted = 0
20                         eDVBVolumecontrol.getInstance().volumeToggleMute()
21
22         def leaveMute(self):
23                 if self.wasMuted == 0:
24                         eDVBVolumecontrol.getInstance().volumeToggleMute()
25
26         def __init__(self, session, infobar):
27                 Screen.__init__(self, session)
28                 self.infobar = infobar
29                 print "enter standby"
30
31                 self["actions"] = ActionMap( [ "StandbyActions" ],
32                 {
33                         "power": self.Power
34                 })
35
36                 self.setMute()
37                 self.session.nav.stopService()
38                 eAVSwitch.getInstance().setInput(1)
39
40                 
41                 #stop/pause? playing services
42                 #switch off avs
43