Changeset 631 for trunk/StreamVision


Ignore:
Timestamp:
09/06/10 17:57:02 (14 years ago)
Author:
Nicholas Riley
Message:

StreamVision.py: iTunes 10 takes a small step forward in accessibility. Block zoom in XQuartz too. Turn off stereo when switching back to local speakers.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/StreamVision/StreamVision.py

    r580 r631  
    9999        return False
    100100    systemEvents = app(id='com.apple.systemEvents')
    101     return not systemEvents.application_processes[u'iTunes'].windows[1].buttons[its.title == u'Computer'].exists()
     101    remote_speakers = systemEvents.application_processes[u'iTunes'].windows[u'iTunes'].buttons[its.attributes['AXDescription'].value.endswith(u'remote speakers')].title()
     102    return (remote_speakers and remote_speakers[0] != k.missing_value)
    102103
    103104def turnStereoOn():
    104105    global needsStereoPowerOn
    105106    if not mayUseStereo():
     107        if HAVE_XTENSION and XTensionApp().status('Stereo'):
     108            XTensionApp().turnoff('Stereo')
    106109        return
    107110    if not XTensionApp().status('Stereo'):
     
    304307                menu_bar_items['Window'].menus.menu_items['Zoom'].click()
    305308            return
    306         elif frontName in ('X11', 'Emacs'): # preserve C-M-\
     309        elif frontName in ('X11', 'XQuartz', 'Emacs'): # preserve C-M-\
    307310            self.unregisterZoomWindowHotKey()
    308311            systemEvents.key_code(42, using=[k.command_down, k.control_down])
Note: See TracChangeset for help on using the changeset viewer.