Ignore:
Timestamp:
11/10/06 19:17:31 (18 years ago)
Author:
Nicholas Riley
Message:

StreamVision.py: Replace filter() with [] for compatibility with
appscript 0.17.0.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/StreamVision/StreamVision.py

    r302 r313  
    148148        if not was_playing and iTunes.player_state.get() == k.stopped:
    149149            # most likely, we're focused on the iPod, so playing does nothing
    150             iTunes.browser_windows[1].view.set(iTunes.user_playlists.filter(its.name=='Stations')[1].get())
     150            iTunes.browser_windows[1].view.set(iTunes.user_playlists[its.name=='Stations'][1].get())
    151151            iTunes.play()
    152152        if HAVE_XTENSION and useStereo:
     
    158158    def playPauseFront(self):
    159159        systemEvents = app(id='com.apple.systemEvents')
    160         frontName = systemEvents.processes.filter(its.frontmost)[1].name()
     160        frontName = systemEvents.processes[its.frontmost][1].name()
    161161        if frontName == 'RealPlayer':
    162162            realPlayer = app(id='com.RealNetworks.RealPlayer')
     
    178178
    179179    def zoomWindow(self):
     180        # XXX detect if "enable access for assistive devices" needs to be enabled
    180181        systemEvents = app(id='com.apple.systemEvents')
    181         frontName = systemEvents.processes.filter(its.frontmost)[1].name()
     182        frontName = systemEvents.processes[its.frontmost][1].name()
    182183        if frontName == 'iTunes':
    183184            systemEvents.processes['iTunes'].menu_bars[1]. \
     
    193194            zoomed.set(not zoomed())
    194195        except (CommandError, RuntimeError):
    195             systemEvents.processes[frontName].windows. \
    196                 filter(its.subrole == 'AXStandardWindow').windows[1]. \
    197                 buttons.filter(its.subrole == 'AXZoomButton').buttons[1].click()
     196            systemEvents.processes[frontName].windows \
     197                [its.subrole == 'AXStandardWindow'].windows[1]. \
     198                buttons[its.subrole == 'AXZoomButton'].buttons[1].click()
    198199
    199200    def finishLaunching(self):
Note: See TracChangeset for help on using the changeset viewer.