summaryrefslogtreecommitdiff
path: root/net-p2p/vuze/files/vuze-5.7.2.0-disable-osx.patch
blob: 6ae2301e75e3abaa288c6d05f729b04371ef8003 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
diff --git a/org/gudy/azureus2/ui/swt/mainwindow/SWTThread.java b/org/gudy/azureus2/ui/swt/mainwindow/SWTThread.java
index 256daff..68010b9 100644
--- a/org/gudy/azureus2/ui/swt/mainwindow/SWTThread.java
+++ b/org/gudy/azureus2/ui/swt/mainwindow/SWTThread.java
@@ -231,66 +231,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) {
-					UIFunctions uiFunctions = UIFunctionsManager.getUIFunctions();
-					if (uiFunctions != null) {
-						event.doit = uiFunctions.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]);
-					}
-					
-					Method mIsRetinaDisplay = claObj.getClass().getMethod("isRetinaDisplay");
-					if (mIsRetinaDisplay != null) {
-						isRetinaDisplay = (Boolean) mIsRetinaDisplay.invoke(claObj);
-					}
-
-					
-				} catch (Throwable e) {
-
-					Debug.printStackTrace(e);
-				}
-			}
-		}   
-
 		if (app != null) {
 			app.runInSWTThread();
 			runner = new Thread(new AERunnable() {