|
|
@ -28,7 +28,8 @@ public class MacOsAddListenerAction implements OSBasedAction { |
|
|
|
Object quitInstance = getProxy(quitHandler, "handleQuitRequestWith", new QuitAction()); |
|
|
|
Object quitInstance = getProxy(quitHandler, "handleQuitRequestWith", new QuitAction()); |
|
|
|
Class aboutHandler = Class.forName("com.apple.eawt.AboutHandler"); |
|
|
|
Class aboutHandler = Class.forName("com.apple.eawt.AboutHandler"); |
|
|
|
Object aboutInstance = getProxy(aboutHandler, "handleAbout", new AboutAction()); |
|
|
|
Object aboutInstance = getProxy(aboutHandler, "handleAbout", new AboutAction()); |
|
|
|
Reflect.on(Reflect.on(app).call("getApplication").get()).call("setQuitHandler", quitInstance) |
|
|
|
Object application = Reflect.on(app).call("getApplication").get(); |
|
|
|
|
|
|
|
Reflect.on(application).call("setQuitHandler", quitInstance) |
|
|
|
.call("setAboutHandler", aboutInstance); |
|
|
|
.call("setAboutHandler", aboutInstance); |
|
|
|
} catch (ClassNotFoundException e) { |
|
|
|
} catch (ClassNotFoundException e) { |
|
|
|
FineLoggerFactory.getLogger().error(e.getMessage(), e); |
|
|
|
FineLoggerFactory.getLogger().error(e.getMessage(), e); |
|
|
|