aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Schweinsberg <[email protected]>2007-02-09 00:55:32 +0000
committerDavid Schweinsberg <[email protected]>2007-02-09 00:55:32 +0000
commitd789c81d25ca4ff7b1cb5c4aee79fe9e6734b43c (patch)
tree66935461c708601dc1a9022706cbae1e860d0837
parent23a0bfd34d268110a067cdcf1ed1f575d1abb56a (diff)
FileDialog now uses the MacOSFilenameFilter when running under Mac OS X.
-rw-r--r--src/net/java/dev/typecast/app/editor/Main.java16
1 files changed, 3 insertions, 13 deletions
diff --git a/src/net/java/dev/typecast/app/editor/Main.java b/src/net/java/dev/typecast/app/editor/Main.java
index 7418bcb..68703f1 100644
--- a/src/net/java/dev/typecast/app/editor/Main.java
+++ b/src/net/java/dev/typecast/app/editor/Main.java
@@ -1,5 +1,5 @@
/*
- * $Id: Main.java,v 1.5 2007-02-08 23:49:26 davidsch Exp $
+ * $Id: Main.java,v 1.6 2007-02-09 00:55:32 davidsch Exp $
*
* Typecast - The Font Development Environment
*
@@ -93,7 +93,7 @@ import net.java.dev.typecast.app.framework.EditorView;
/**
* @author <a href="mailto:[email protected]">David Schweinsberg</a>
- * @version $Id: Main.java,v 1.5 2007-02-08 23:49:26 davidsch Exp $
+ * @version $Id: Main.java,v 1.6 2007-02-09 00:55:32 davidsch Exp $
*/
public class Main {
@@ -323,17 +323,7 @@ public class Main {
// Display a file chooser, depending on what OS we're running on
if (System.getProperty("os.name").equals("Mac OS X")) {
FileDialog fd = new FileDialog(_frame, "Open Font");
- fd.setFilenameFilter(new FilenameFilter() {
- public boolean accept(File dir, String name) {
- if (name.endsWith(".ttf")
- || name.endsWith(".ttc")
- || name.endsWith(".otf")
- || name.endsWith(".dfont")) {
- return true;
- }
- return false;
- }
- });
+ fd.setFilenameFilter(new MacOSFilenameFilter());
fd.setVisible(true);
if (fd.getFile() != null) {
pathName = fd.getDirectory() + fd.getFile();