~gryle-devel/gryle/trunk-deleted

« back to all changes in this revision

Viewing changes to src/uk/org/wuglug/gryle/ui/m/MenuController.java

  • Committer: Chris Lamb
  • Date: 2007-01-13 23:51:14 UTC
  • mfrom: (14 gryle)
  • mto: (1.2.18 gryle)
  • mto: This revision was merged to the branch mainline in revision 18.
  • Revision ID: chris@chris-lamb.co.uk-20070113235114-q7e3ktyjywvobamf
 

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
import java.awt.event.ActionListener;
8
8
import java.io.File;
9
9
 
 
10
import javax.swing.JDialog;
10
11
import javax.swing.JFileChooser;
 
12
import javax.swing.JOptionPane;
11
13
 
12
14
import uk.org.wuglug.gryle.ui.v.FrontEnd;
13
15
import uk.org.wuglug.gryle.ui.v.MainMenu;
65
67
            
66
68
            // Show open dialog; this method does not return until the dialog is closed
67
69
            fc.showOpenDialog(FrontEnd.getInstance());
68
 
            new SongDirectory(fc.getSelectedFile());
 
70
            File selectedFile = fc.getSelectedFile();
 
71
            if(!selectedFile.isDirectory()) {
 
72
                JOptionPane.showMessageDialog(null, "File cannot be a directory");
 
73
            } else {
 
74
                new SongDirectory(selectedFile);
 
75
            }
69
76
        }
70
77
 
71
78
}