Changeset 301
- Timestamp:
- 10/01/06 09:41:50 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/StreamVision/StreamVision.py
r300 r301 156 156 else: 157 157 XTensionApp().turnoff('Stereo') 158 159 def playPauseFront(self): 160 systemEvents = app(id='com.apple.systemEvents') 161 frontName = systemEvents.processes.filter(its.frontmost)[1].name() 162 if frontName == 'RealPlayer': 163 realPlayer = app(id='com.RealNetworks.RealPlayer') 164 if realPlayer.players[0].state.get() == k.playing: 165 realPlayer.pause() 166 else: 167 realPlayer.play() 168 elif frontName == 'VLC': 169 app(id='org.videolan.vlc').play() # equivalent to playpause 170 else: 171 self.playPause(useStereo=False) 158 172 159 173 def registerZoomWindowHotKey(self): … … 212 226 iTunesApp().previous_track() 213 227 elif key == kHIDUsage_Csmr_PlayOrPause: 214 self.playPause (useStereo=False)228 self.playPauseFront() 215 229 super(StreamVision, self).sendEvent_(theEvent) 216 230
Note:
See TracChangeset
for help on using the changeset viewer.