author | Ed Swartz <ed.swartz@nokia.com> |
Fri, 11 Dec 2009 09:47:44 -0600 | |
changeset 677 | d13345e153e8 |
parent 676 | 7a49747f237a |
permissions | -rw-r--r-- |
676
7a49747f237a
Initial fixes for bug #10363 (Browse... button behavior)
Ed Swartz <ed.swartz@nokia.com>
parents:
diff
changeset
|
1 |
/* |
7a49747f237a
Initial fixes for bug #10363 (Browse... button behavior)
Ed Swartz <ed.swartz@nokia.com>
parents:
diff
changeset
|
2 |
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
7a49747f237a
Initial fixes for bug #10363 (Browse... button behavior)
Ed Swartz <ed.swartz@nokia.com>
parents:
diff
changeset
|
3 |
* All rights reserved. |
7a49747f237a
Initial fixes for bug #10363 (Browse... button behavior)
Ed Swartz <ed.swartz@nokia.com>
parents:
diff
changeset
|
4 |
* This component and the accompanying materials are made available |
7a49747f237a
Initial fixes for bug #10363 (Browse... button behavior)
Ed Swartz <ed.swartz@nokia.com>
parents:
diff
changeset
|
5 |
* under the terms of the License "Eclipse Public License v1.0" |
7a49747f237a
Initial fixes for bug #10363 (Browse... button behavior)
Ed Swartz <ed.swartz@nokia.com>
parents:
diff
changeset
|
6 |
* which accompanies this distribution, and is available |
7a49747f237a
Initial fixes for bug #10363 (Browse... button behavior)
Ed Swartz <ed.swartz@nokia.com>
parents:
diff
changeset
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html". |
7a49747f237a
Initial fixes for bug #10363 (Browse... button behavior)
Ed Swartz <ed.swartz@nokia.com>
parents:
diff
changeset
|
8 |
* |
7a49747f237a
Initial fixes for bug #10363 (Browse... button behavior)
Ed Swartz <ed.swartz@nokia.com>
parents:
diff
changeset
|
9 |
* Initial Contributors: |
7a49747f237a
Initial fixes for bug #10363 (Browse... button behavior)
Ed Swartz <ed.swartz@nokia.com>
parents:
diff
changeset
|
10 |
* Nokia Corporation - initial contribution. |
7a49747f237a
Initial fixes for bug #10363 (Browse... button behavior)
Ed Swartz <ed.swartz@nokia.com>
parents:
diff
changeset
|
11 |
* |
7a49747f237a
Initial fixes for bug #10363 (Browse... button behavior)
Ed Swartz <ed.swartz@nokia.com>
parents:
diff
changeset
|
12 |
* Contributors: |
7a49747f237a
Initial fixes for bug #10363 (Browse... button behavior)
Ed Swartz <ed.swartz@nokia.com>
parents:
diff
changeset
|
13 |
* |
7a49747f237a
Initial fixes for bug #10363 (Browse... button behavior)
Ed Swartz <ed.swartz@nokia.com>
parents:
diff
changeset
|
14 |
* Description: |
7a49747f237a
Initial fixes for bug #10363 (Browse... button behavior)
Ed Swartz <ed.swartz@nokia.com>
parents:
diff
changeset
|
15 |
* |
7a49747f237a
Initial fixes for bug #10363 (Browse... button behavior)
Ed Swartz <ed.swartz@nokia.com>
parents:
diff
changeset
|
16 |
*/ |
7a49747f237a
Initial fixes for bug #10363 (Browse... button behavior)
Ed Swartz <ed.swartz@nokia.com>
parents:
diff
changeset
|
17 |
|
7a49747f237a
Initial fixes for bug #10363 (Browse... button behavior)
Ed Swartz <ed.swartz@nokia.com>
parents:
diff
changeset
|
18 |
package com.nokia.cpp.internal.api.utils.ui; |
7a49747f237a
Initial fixes for bug #10363 (Browse... button behavior)
Ed Swartz <ed.swartz@nokia.com>
parents:
diff
changeset
|
19 |
|
7a49747f237a
Initial fixes for bug #10363 (Browse... button behavior)
Ed Swartz <ed.swartz@nokia.com>
parents:
diff
changeset
|
20 |
import java.io.File; |
7a49747f237a
Initial fixes for bug #10363 (Browse... button behavior)
Ed Swartz <ed.swartz@nokia.com>
parents:
diff
changeset
|
21 |
|
7a49747f237a
Initial fixes for bug #10363 (Browse... button behavior)
Ed Swartz <ed.swartz@nokia.com>
parents:
diff
changeset
|
22 |
import org.eclipse.core.runtime.IPath; |
7a49747f237a
Initial fixes for bug #10363 (Browse... button behavior)
Ed Swartz <ed.swartz@nokia.com>
parents:
diff
changeset
|
23 |
import org.eclipse.swt.widgets.DirectoryDialog; |
7a49747f237a
Initial fixes for bug #10363 (Browse... button behavior)
Ed Swartz <ed.swartz@nokia.com>
parents:
diff
changeset
|
24 |
import org.eclipse.swt.widgets.FileDialog; |
7a49747f237a
Initial fixes for bug #10363 (Browse... button behavior)
Ed Swartz <ed.swartz@nokia.com>
parents:
diff
changeset
|
25 |
import org.eclipse.swt.widgets.Text; |
7a49747f237a
Initial fixes for bug #10363 (Browse... button behavior)
Ed Swartz <ed.swartz@nokia.com>
parents:
diff
changeset
|
26 |
|
7a49747f237a
Initial fixes for bug #10363 (Browse... button behavior)
Ed Swartz <ed.swartz@nokia.com>
parents:
diff
changeset
|
27 |
/** |
677 | 28 |
* Utilities to make it easier to use file and directory dialogs which are associated |
29 |
* with text entry fields. |
|
30 |
* <p> |
|
31 |
* First, promote UI where Browse... starts from the current textual entry rather than |
|
32 |
* some random place. |
|
33 |
* <p> |
|
34 |
* Second, overcome terrible SWT behavior: even if you do set the filter path, then if it |
|
35 |
* is not 100% correct, it will again revert to the home directory. So, find the nearest |
|
36 |
* directory that <i>does</i> exist. |
|
676
7a49747f237a
Initial fixes for bug #10363 (Browse... button behavior)
Ed Swartz <ed.swartz@nokia.com>
parents:
diff
changeset
|
37 |
*/ |
7a49747f237a
Initial fixes for bug #10363 (Browse... button behavior)
Ed Swartz <ed.swartz@nokia.com>
parents:
diff
changeset
|
38 |
public class BrowseDialogUtils { |
7a49747f237a
Initial fixes for bug #10363 (Browse... button behavior)
Ed Swartz <ed.swartz@nokia.com>
parents:
diff
changeset
|
39 |
/** |
7a49747f237a
Initial fixes for bug #10363 (Browse... button behavior)
Ed Swartz <ed.swartz@nokia.com>
parents:
diff
changeset
|
40 |
* When issuing a "Browse..." command next to a text entry field, initialize |
677 | 41 |
* the dialog with the nearest existing file or directory in that text field. |
42 |
* @param dialog |
|
43 |
* @param textEntry |
|
44 |
* @pathm defaultPath the path to use when the text entry is empty |
|
45 |
*/ |
|
46 |
public static void initializeFrom(FileDialog dialog, Text textEntry, IPath defaultPath) { |
|
47 |
if (textEntry != null) { |
|
48 |
String existing = textEntry.getText().trim(); |
|
49 |
if (existing.length() > 0) { |
|
50 |
initializeFrom(dialog, existing); |
|
51 |
return; |
|
52 |
} |
|
53 |
} |
|
54 |
if (defaultPath != null) { |
|
55 |
initializeFrom(dialog, defaultPath); |
|
56 |
} |
|
57 |
} |
|
58 |
||
59 |
/** |
|
60 |
* When issuing a "Browse..." command next to a text entry field, initialize |
|
61 |
* the dialog with the nearest existing file or directory in that text field. |
|
676
7a49747f237a
Initial fixes for bug #10363 (Browse... button behavior)
Ed Swartz <ed.swartz@nokia.com>
parents:
diff
changeset
|
62 |
* @param dialog |
7a49747f237a
Initial fixes for bug #10363 (Browse... button behavior)
Ed Swartz <ed.swartz@nokia.com>
parents:
diff
changeset
|
63 |
* @param textEntry |
7a49747f237a
Initial fixes for bug #10363 (Browse... button behavior)
Ed Swartz <ed.swartz@nokia.com>
parents:
diff
changeset
|
64 |
*/ |
7a49747f237a
Initial fixes for bug #10363 (Browse... button behavior)
Ed Swartz <ed.swartz@nokia.com>
parents:
diff
changeset
|
65 |
public static void initializeFrom(FileDialog dialog, Text textEntry) { |
7a49747f237a
Initial fixes for bug #10363 (Browse... button behavior)
Ed Swartz <ed.swartz@nokia.com>
parents:
diff
changeset
|
66 |
if (textEntry == null) |
7a49747f237a
Initial fixes for bug #10363 (Browse... button behavior)
Ed Swartz <ed.swartz@nokia.com>
parents:
diff
changeset
|
67 |
return; |
677 | 68 |
String existing = textEntry.getText().trim(); |
676
7a49747f237a
Initial fixes for bug #10363 (Browse... button behavior)
Ed Swartz <ed.swartz@nokia.com>
parents:
diff
changeset
|
69 |
initializeFrom(dialog, existing); |
7a49747f237a
Initial fixes for bug #10363 (Browse... button behavior)
Ed Swartz <ed.swartz@nokia.com>
parents:
diff
changeset
|
70 |
} |
7a49747f237a
Initial fixes for bug #10363 (Browse... button behavior)
Ed Swartz <ed.swartz@nokia.com>
parents:
diff
changeset
|
71 |
|
7a49747f237a
Initial fixes for bug #10363 (Browse... button behavior)
Ed Swartz <ed.swartz@nokia.com>
parents:
diff
changeset
|
72 |
/** |
677 | 73 |
* When issuing a "Browse..." command with an expected file, initialize |
74 |
* the dialog with the nearest existing file or directory. |
|
676
7a49747f237a
Initial fixes for bug #10363 (Browse... button behavior)
Ed Swartz <ed.swartz@nokia.com>
parents:
diff
changeset
|
75 |
* @param dialog |
7a49747f237a
Initial fixes for bug #10363 (Browse... button behavior)
Ed Swartz <ed.swartz@nokia.com>
parents:
diff
changeset
|
76 |
* @param path |
7a49747f237a
Initial fixes for bug #10363 (Browse... button behavior)
Ed Swartz <ed.swartz@nokia.com>
parents:
diff
changeset
|
77 |
*/ |
7a49747f237a
Initial fixes for bug #10363 (Browse... button behavior)
Ed Swartz <ed.swartz@nokia.com>
parents:
diff
changeset
|
78 |
public static void initializeFrom(FileDialog dialog, IPath path) { |
7a49747f237a
Initial fixes for bug #10363 (Browse... button behavior)
Ed Swartz <ed.swartz@nokia.com>
parents:
diff
changeset
|
79 |
if (path != null) { |
7a49747f237a
Initial fixes for bug #10363 (Browse... button behavior)
Ed Swartz <ed.swartz@nokia.com>
parents:
diff
changeset
|
80 |
initializeFrom(dialog, path.toOSString()); |
7a49747f237a
Initial fixes for bug #10363 (Browse... button behavior)
Ed Swartz <ed.swartz@nokia.com>
parents:
diff
changeset
|
81 |
} |
7a49747f237a
Initial fixes for bug #10363 (Browse... button behavior)
Ed Swartz <ed.swartz@nokia.com>
parents:
diff
changeset
|
82 |
} |
7a49747f237a
Initial fixes for bug #10363 (Browse... button behavior)
Ed Swartz <ed.swartz@nokia.com>
parents:
diff
changeset
|
83 |
|
7a49747f237a
Initial fixes for bug #10363 (Browse... button behavior)
Ed Swartz <ed.swartz@nokia.com>
parents:
diff
changeset
|
84 |
/** |
677 | 85 |
* When issuing a "Browse..." command with an expected file, initialize |
86 |
* the dialog with the nearest existing file or directory. |
|
676
7a49747f237a
Initial fixes for bug #10363 (Browse... button behavior)
Ed Swartz <ed.swartz@nokia.com>
parents:
diff
changeset
|
87 |
* @param dialog |
7a49747f237a
Initial fixes for bug #10363 (Browse... button behavior)
Ed Swartz <ed.swartz@nokia.com>
parents:
diff
changeset
|
88 |
* @param path |
7a49747f237a
Initial fixes for bug #10363 (Browse... button behavior)
Ed Swartz <ed.swartz@nokia.com>
parents:
diff
changeset
|
89 |
*/ |
7a49747f237a
Initial fixes for bug #10363 (Browse... button behavior)
Ed Swartz <ed.swartz@nokia.com>
parents:
diff
changeset
|
90 |
public static void initializeFrom(FileDialog dialog, String path) { |
7a49747f237a
Initial fixes for bug #10363 (Browse... button behavior)
Ed Swartz <ed.swartz@nokia.com>
parents:
diff
changeset
|
91 |
if (path != null && path.length() > 0) { |
677 | 92 |
boolean isDirectory = path.endsWith("/") || path.endsWith("\\"); |
676
7a49747f237a
Initial fixes for bug #10363 (Browse... button behavior)
Ed Swartz <ed.swartz@nokia.com>
parents:
diff
changeset
|
93 |
File file = new File(path); |
677 | 94 |
boolean exists = file.exists(); |
95 |
if (exists) { |
|
96 |
isDirectory = file.isDirectory(); |
|
97 |
} |
|
98 |
if (!isDirectory) { |
|
99 |
dialog.setFileName(file.getName()); |
|
100 |
} |
|
101 |
if (exists) { |
|
676
7a49747f237a
Initial fixes for bug #10363 (Browse... button behavior)
Ed Swartz <ed.swartz@nokia.com>
parents:
diff
changeset
|
102 |
if (file.isAbsolute()) { |
677 | 103 |
dialog.setFilterPath(isDirectory ? file.getAbsolutePath() : file.getParent()); |
676
7a49747f237a
Initial fixes for bug #10363 (Browse... button behavior)
Ed Swartz <ed.swartz@nokia.com>
parents:
diff
changeset
|
104 |
} |
7a49747f237a
Initial fixes for bug #10363 (Browse... button behavior)
Ed Swartz <ed.swartz@nokia.com>
parents:
diff
changeset
|
105 |
} else { |
7a49747f237a
Initial fixes for bug #10363 (Browse... button behavior)
Ed Swartz <ed.swartz@nokia.com>
parents:
diff
changeset
|
106 |
if (!file.isAbsolute()) |
7a49747f237a
Initial fixes for bug #10363 (Browse... button behavior)
Ed Swartz <ed.swartz@nokia.com>
parents:
diff
changeset
|
107 |
return; |
7a49747f237a
Initial fixes for bug #10363 (Browse... button behavior)
Ed Swartz <ed.swartz@nokia.com>
parents:
diff
changeset
|
108 |
File dir = file.getParentFile(); |
7a49747f237a
Initial fixes for bug #10363 (Browse... button behavior)
Ed Swartz <ed.swartz@nokia.com>
parents:
diff
changeset
|
109 |
while (dir != null && !dir.exists()) { |
7a49747f237a
Initial fixes for bug #10363 (Browse... button behavior)
Ed Swartz <ed.swartz@nokia.com>
parents:
diff
changeset
|
110 |
dir = dir.getParentFile(); |
7a49747f237a
Initial fixes for bug #10363 (Browse... button behavior)
Ed Swartz <ed.swartz@nokia.com>
parents:
diff
changeset
|
111 |
} |
7a49747f237a
Initial fixes for bug #10363 (Browse... button behavior)
Ed Swartz <ed.swartz@nokia.com>
parents:
diff
changeset
|
112 |
if (dir != null) { |
7a49747f237a
Initial fixes for bug #10363 (Browse... button behavior)
Ed Swartz <ed.swartz@nokia.com>
parents:
diff
changeset
|
113 |
dialog.setFilterPath(dir.getAbsolutePath()); |
7a49747f237a
Initial fixes for bug #10363 (Browse... button behavior)
Ed Swartz <ed.swartz@nokia.com>
parents:
diff
changeset
|
114 |
} |
7a49747f237a
Initial fixes for bug #10363 (Browse... button behavior)
Ed Swartz <ed.swartz@nokia.com>
parents:
diff
changeset
|
115 |
} |
7a49747f237a
Initial fixes for bug #10363 (Browse... button behavior)
Ed Swartz <ed.swartz@nokia.com>
parents:
diff
changeset
|
116 |
} |
7a49747f237a
Initial fixes for bug #10363 (Browse... button behavior)
Ed Swartz <ed.swartz@nokia.com>
parents:
diff
changeset
|
117 |
} |
7a49747f237a
Initial fixes for bug #10363 (Browse... button behavior)
Ed Swartz <ed.swartz@nokia.com>
parents:
diff
changeset
|
118 |
|
7a49747f237a
Initial fixes for bug #10363 (Browse... button behavior)
Ed Swartz <ed.swartz@nokia.com>
parents:
diff
changeset
|
119 |
/** |
7a49747f237a
Initial fixes for bug #10363 (Browse... button behavior)
Ed Swartz <ed.swartz@nokia.com>
parents:
diff
changeset
|
120 |
* When issuing a "Browse..." command next to a text entry field, initialize |
677 | 121 |
* the dialog with the nearest existing directory in that text field. |
122 |
* @param dialog |
|
123 |
* @param textEntry |
|
124 |
* @param defaultPath the default path if the text entry is empty |
|
125 |
*/ |
|
126 |
public static void initializeFrom(DirectoryDialog dialog, Text textEntry, IPath defaultPath) { |
|
127 |
if (textEntry != null) { |
|
128 |
String existing = textEntry.getText().trim(); |
|
129 |
if (existing.length() > 0) { |
|
130 |
initializeFrom(dialog, existing); |
|
131 |
return; |
|
132 |
} |
|
133 |
} |
|
134 |
if (defaultPath != null) { |
|
135 |
initializeFrom(dialog, defaultPath); |
|
136 |
} |
|
137 |
} |
|
138 |
||
139 |
/** |
|
140 |
* When issuing a "Browse..." command next to a text entry field, initialize |
|
141 |
* the dialog with the nearest existing directory in that text field. |
|
676
7a49747f237a
Initial fixes for bug #10363 (Browse... button behavior)
Ed Swartz <ed.swartz@nokia.com>
parents:
diff
changeset
|
142 |
* @param dialog |
7a49747f237a
Initial fixes for bug #10363 (Browse... button behavior)
Ed Swartz <ed.swartz@nokia.com>
parents:
diff
changeset
|
143 |
* @param textEntry |
7a49747f237a
Initial fixes for bug #10363 (Browse... button behavior)
Ed Swartz <ed.swartz@nokia.com>
parents:
diff
changeset
|
144 |
*/ |
7a49747f237a
Initial fixes for bug #10363 (Browse... button behavior)
Ed Swartz <ed.swartz@nokia.com>
parents:
diff
changeset
|
145 |
public static void initializeFrom(DirectoryDialog dialog, Text textEntry) { |
7a49747f237a
Initial fixes for bug #10363 (Browse... button behavior)
Ed Swartz <ed.swartz@nokia.com>
parents:
diff
changeset
|
146 |
if (textEntry == null) |
7a49747f237a
Initial fixes for bug #10363 (Browse... button behavior)
Ed Swartz <ed.swartz@nokia.com>
parents:
diff
changeset
|
147 |
return; |
677 | 148 |
String existing = textEntry.getText().trim(); |
676
7a49747f237a
Initial fixes for bug #10363 (Browse... button behavior)
Ed Swartz <ed.swartz@nokia.com>
parents:
diff
changeset
|
149 |
initializeFrom(dialog, existing); |
7a49747f237a
Initial fixes for bug #10363 (Browse... button behavior)
Ed Swartz <ed.swartz@nokia.com>
parents:
diff
changeset
|
150 |
} |
7a49747f237a
Initial fixes for bug #10363 (Browse... button behavior)
Ed Swartz <ed.swartz@nokia.com>
parents:
diff
changeset
|
151 |
|
7a49747f237a
Initial fixes for bug #10363 (Browse... button behavior)
Ed Swartz <ed.swartz@nokia.com>
parents:
diff
changeset
|
152 |
/** |
677 | 153 |
* When issuing a "Browse..." command with an expected directory, initialize |
154 |
* the dialog with the nearest existing path. |
|
676
7a49747f237a
Initial fixes for bug #10363 (Browse... button behavior)
Ed Swartz <ed.swartz@nokia.com>
parents:
diff
changeset
|
155 |
* @param dialog |
7a49747f237a
Initial fixes for bug #10363 (Browse... button behavior)
Ed Swartz <ed.swartz@nokia.com>
parents:
diff
changeset
|
156 |
* @param path |
7a49747f237a
Initial fixes for bug #10363 (Browse... button behavior)
Ed Swartz <ed.swartz@nokia.com>
parents:
diff
changeset
|
157 |
*/ |
7a49747f237a
Initial fixes for bug #10363 (Browse... button behavior)
Ed Swartz <ed.swartz@nokia.com>
parents:
diff
changeset
|
158 |
public static void initializeFrom(DirectoryDialog dialog, IPath path) { |
7a49747f237a
Initial fixes for bug #10363 (Browse... button behavior)
Ed Swartz <ed.swartz@nokia.com>
parents:
diff
changeset
|
159 |
if (path != null) { |
7a49747f237a
Initial fixes for bug #10363 (Browse... button behavior)
Ed Swartz <ed.swartz@nokia.com>
parents:
diff
changeset
|
160 |
initializeFrom(dialog, path.toOSString()); |
7a49747f237a
Initial fixes for bug #10363 (Browse... button behavior)
Ed Swartz <ed.swartz@nokia.com>
parents:
diff
changeset
|
161 |
} |
7a49747f237a
Initial fixes for bug #10363 (Browse... button behavior)
Ed Swartz <ed.swartz@nokia.com>
parents:
diff
changeset
|
162 |
} |
7a49747f237a
Initial fixes for bug #10363 (Browse... button behavior)
Ed Swartz <ed.swartz@nokia.com>
parents:
diff
changeset
|
163 |
|
7a49747f237a
Initial fixes for bug #10363 (Browse... button behavior)
Ed Swartz <ed.swartz@nokia.com>
parents:
diff
changeset
|
164 |
/** |
677 | 165 |
* When issuing a "Browse..." command with an expected directory, initialize |
166 |
* the dialog with the nearest existing path. |
|
676
7a49747f237a
Initial fixes for bug #10363 (Browse... button behavior)
Ed Swartz <ed.swartz@nokia.com>
parents:
diff
changeset
|
167 |
* @param dialog |
7a49747f237a
Initial fixes for bug #10363 (Browse... button behavior)
Ed Swartz <ed.swartz@nokia.com>
parents:
diff
changeset
|
168 |
* @param path |
7a49747f237a
Initial fixes for bug #10363 (Browse... button behavior)
Ed Swartz <ed.swartz@nokia.com>
parents:
diff
changeset
|
169 |
*/ |
7a49747f237a
Initial fixes for bug #10363 (Browse... button behavior)
Ed Swartz <ed.swartz@nokia.com>
parents:
diff
changeset
|
170 |
public static void initializeFrom(DirectoryDialog dialog, String path) { |
7a49747f237a
Initial fixes for bug #10363 (Browse... button behavior)
Ed Swartz <ed.swartz@nokia.com>
parents:
diff
changeset
|
171 |
if (path != null && path.length() > 0) { |
7a49747f237a
Initial fixes for bug #10363 (Browse... button behavior)
Ed Swartz <ed.swartz@nokia.com>
parents:
diff
changeset
|
172 |
File file = new File(path); |
7a49747f237a
Initial fixes for bug #10363 (Browse... button behavior)
Ed Swartz <ed.swartz@nokia.com>
parents:
diff
changeset
|
173 |
if (!file.isAbsolute()) |
7a49747f237a
Initial fixes for bug #10363 (Browse... button behavior)
Ed Swartz <ed.swartz@nokia.com>
parents:
diff
changeset
|
174 |
return; |
7a49747f237a
Initial fixes for bug #10363 (Browse... button behavior)
Ed Swartz <ed.swartz@nokia.com>
parents:
diff
changeset
|
175 |
while (file != null && !file.exists()) { |
7a49747f237a
Initial fixes for bug #10363 (Browse... button behavior)
Ed Swartz <ed.swartz@nokia.com>
parents:
diff
changeset
|
176 |
file = file.getParentFile(); |
7a49747f237a
Initial fixes for bug #10363 (Browse... button behavior)
Ed Swartz <ed.swartz@nokia.com>
parents:
diff
changeset
|
177 |
} |
7a49747f237a
Initial fixes for bug #10363 (Browse... button behavior)
Ed Swartz <ed.swartz@nokia.com>
parents:
diff
changeset
|
178 |
if (file != null) { |
7a49747f237a
Initial fixes for bug #10363 (Browse... button behavior)
Ed Swartz <ed.swartz@nokia.com>
parents:
diff
changeset
|
179 |
dialog.setFilterPath(file.getAbsolutePath()); |
7a49747f237a
Initial fixes for bug #10363 (Browse... button behavior)
Ed Swartz <ed.swartz@nokia.com>
parents:
diff
changeset
|
180 |
} |
7a49747f237a
Initial fixes for bug #10363 (Browse... button behavior)
Ed Swartz <ed.swartz@nokia.com>
parents:
diff
changeset
|
181 |
} |
7a49747f237a
Initial fixes for bug #10363 (Browse... button behavior)
Ed Swartz <ed.swartz@nokia.com>
parents:
diff
changeset
|
182 |
} |
7a49747f237a
Initial fixes for bug #10363 (Browse... button behavior)
Ed Swartz <ed.swartz@nokia.com>
parents:
diff
changeset
|
183 |
} |