~tapaal-contributor/tapaal/open-on-windows-1868525

« back to all changes in this revision

Viewing changes to src/pipe/gui/widgets/filebrowser/NativeFileBrowserFallback.java

  • Committer: ptaankvist at gmail
  • Date: 2020-03-23 15:58:43 UTC
  • Revision ID: ptaankvist@gmail.com-20200323155843-4agri9lk46w7klmq
Comment on the code

Show diffs side-by-side

added added

removed removed

Lines of Context:
46
46
                FileNameExtensionFilter filter;
47
47
 
48
48
                // Setup filter if extension specified
 
49
                //This is needed for Linux and Mac
49
50
                if(!ext.equals("")){
50
51
                        if(!optionalExt.equals("")) {
51
52
                                fc.setFilenameFilter(new FilenameFilter() {
78
79
        public File openFile() {
79
80
                if(specifiedPath == null) specifiedPath = lastOpenPath;
80
81
                fc.setDirectory(specifiedPath);
 
82
                //This is needed for windows
81
83
                if(optionalExt.equals("")) fc.setFile(ext.equals("")? "":("*."+ext));
82
84
                else fc.setFile(ext.equals("")? "":("*."+ext+";*."+optionalExt));
83
85
                fc.setMode(FileDialog.LOAD);