Changeset 192 for trunk/StreamVision


Ignore:
Timestamp:
06/21/05 23:08:19 (19 years ago)
Author:
Nicholas Riley
Message:

StreamVision.py: added distributed notification support for iTunes track changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/StreamVision/StreamVision.py

    r191 r192  
    44from appscript import app, k
    55from AppKit import NSApplication, NSBeep, NSSystemDefined, NSURL, NSWorkspace
     6from Foundation import NSDistributedNotificationCenter
    67from PyObjCTools import AppHelper
    78from Carbon.CarbonEvt import RegisterEventHotKey, GetApplicationEventTarget
     
    115116            self.hotKeyActions[theEvent.data1()]()
    116117        super(StreamVision, self).sendEvent_(theEvent)
     118       
     119    def finishLaunching(self):
     120        super(StreamVision, self).finishLaunching()
     121        NSDistributedNotificationCenter.defaultCenter().addObserver_selector_name_object_(self, self.displayTrackInfo, 'com.apple.iTunes.playerInfo', None)
    117122
    118123if __name__ == "__main__":
Note: See TracChangeset for help on using the changeset viewer.