--- a/org/gudy/azureus2/ui/swt/mainwindow/SWTThread.java +++ b/org/gudy/azureus2/ui/swt/mainwindow/SWTThread.java @@ -229,57 +229,6 @@ public class SWTThread { } }); - if (Constants.isOSX) { - - // On Cocoa, we get a Close trigger on display. Need to check if all - // platforms send this. - display.addListener(SWT.Close, new Listener() { - public void handleEvent(Event event) { - event.doit = UIFunctionsManager.getUIFunctions().dispose(false, false); - } - }); - - String platform = SWT.getPlatform(); - // use reflection here so we decouple generic SWT from OSX specific stuff to an extent - - if (platform.equals("carbon")) { - try { - - Class ehancerClass = Class.forName("org.gudy.azureus2.ui.swt.osx.CarbonUIEnhancer"); - - Constructor constructor = ehancerClass.getConstructor(new Class[] {}); - - constructor.newInstance(new Object[] {}); - - } catch (Throwable e) { - - Debug.printStackTrace(e); - } - } else if (platform.equals("cocoa")) { - try { - - Class ehancerClass = Class.forName("org.gudy.azureus2.ui.swt.osx.CocoaUIEnhancer"); - - Method mGetInstance = ehancerClass.getMethod("getInstance", new Class[0]); - Object claObj = mGetInstance.invoke(null, new Object[0] ); - - Method mHookAppMenu = claObj.getClass().getMethod("hookApplicationMenu", new Class[] {}); - if (mHookAppMenu != null) { - mHookAppMenu.invoke(claObj, new Object[0]); - } - - Method mHookDocOpen = claObj.getClass().getMethod("hookDocumentOpen", new Class[] {}); - if (mHookDocOpen != null) { - mHookDocOpen.invoke(claObj, new Object[0]); - } - - } catch (Throwable e) { - - Debug.printStackTrace(e); - } - } - } - if (app != null) { app.runInSWTThread(); runner = new Thread(new AERunnable() {