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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
|
From 2bd7907aef02530680cfd795f3f757613777c064 Mon Sep 17 00:00:00 2001
From: Stanislav Ochotnicky <sochotnicky@gmail.com>
Date: Sat, 10 Jul 2010 15:50:13 +0200
Subject: [PATCH] Remove MacOS GUI references
---
src/phex/gui/common/FileDialogHandler.java | 45 +--------------------------
src/phex/gui/common/GUIRegistry.java | 5 ---
2 files changed, 2 insertions(+), 48 deletions(-)
diff --git a/src/phex/gui/common/FileDialogHandler.java b/src/phex/gui/common/FileDialogHandler.java
index a5ee4f7..530f374 100644
--- a/src/phex/gui/common/FileDialogHandler.java
+++ b/src/phex/gui/common/FileDialogHandler.java
@@ -34,7 +34,6 @@ import javax.swing.filechooser.FileFilter;
import org.apache.commons.lang.SystemUtils;
-import phex.gui.macosx.MacOsxGUIUtils;
import phex.utils.DirectoryOnlyFileFilter;
public class FileDialogHandler
@@ -45,7 +44,7 @@ public class FileDialogHandler
{
if ( SystemUtils.IS_OS_MAC_OSX )
{
- return openMacDirectoryChooser( title, null, null );
+ return null;
}
else
{
@@ -71,10 +70,7 @@ public class FileDialogHandler
{
if ( SystemUtils.IS_OS_MAC_OSX )
{
- return new File[]
- {
- openMacDirectoryChooser( title, notifyPopupTitle, notifyPopupShortMessage )
- };
+ return null;
}
else
{
@@ -85,43 +81,6 @@ public class FileDialogHandler
}
}
- private static File openMacDirectoryChooser( String title,
- String notifyPopupTitle, String notifyPopupShortMessage )
- {
- // create folder dialog through other class this prevents
- // NoClassDefFoundError on Windows systems since the import of the
- // required OS X classes is elsewhere.
- FileDialog dia = MacOsxGUIUtils.createFolderDialog();
- dia.setTitle(title);
-
- // unfortunatly its not possible to display notification popup
- // besides heavy weight dialog.
- //if ( notifyPopupTitle != null || notifyPopupShortMessage != null )
- //{
- //displayMacNotificationPopup( dia, notifyPopupTitle,
- // notifyPopupShortMessage );
- //}
-
- DirectoryOnlyFileFilter filter = new DirectoryOnlyFileFilter();
- dia.setFilenameFilter( new FileFilterWrapper(
- filter) );
- dia.setVisible( true );
- String dirStr = dia.getDirectory();
- String fileStr = dia.getFile();
-
- if( dirStr == null || fileStr == null )
- {
- return null;
- }
- File file = new File(dirStr, fileStr);
- // validate filter
- if( !filter.accept(file) )
- {
- return null;
- }
- return file;
- }
-
private static JFileChooser initDefaultChooser( String title,
String approveBtnText, char approveBtnMnemonic, FileFilter filter,
int mode, File currentDirectory, String notifyPopupTitle,
diff --git a/src/phex/gui/common/GUIRegistry.java b/src/phex/gui/common/GUIRegistry.java
index 852722e..3c28f2e 100644
--- a/src/phex/gui/common/GUIRegistry.java
+++ b/src/phex/gui/common/GUIRegistry.java
@@ -47,7 +47,6 @@ import phex.gui.actions.FWAction;
import phex.gui.actions.NewDownloadAction;
import phex.gui.actions.SwitchNetworkAction;
import phex.gui.chat.ChatFrameManager;
-import phex.gui.macosx.MacOsxGUIUtils;
import phex.gui.prefs.InterfacePrefs;
import phex.update.UpdateCheckRunner;
import phex.utils.Localizer;
@@ -119,10 +118,6 @@ public final class GUIRegistry implements GUIRegistryConstants
}
}
- if ( SystemUtils.IS_OS_MAC_OSX )
- {
- MacOsxGUIUtils.installEventHandlers();
- }
initializeGlobalActions();
chatFrameManager = new ChatFrameManager();
try
--
1.7.1
|