def setDockIcon(): if onMacOSX: # I don't know _why_ passing null here works. # My guess is that Apple somehow elects an image based on the # first window created, and setting it to null means # "ignore windows, just use the default." # Then the -Xdock:icon JVM option sets the default. app = Application.getApplication() if hasattr(app, 'setDockIconImage'): app.setDockIconImage(None)
def installOpenHandler(program): if onMacOSX: app = Application.getApplication() adapter = JESApplicationAdapter(program) app.addApplicationListener(adapter) app.setEnabledPreferencesMenu(True)