Sequence seq;
if(command == "New") {
- Moosique.clearSequence();
+ if (!Moosique.promptOnUnsavedChanges()) Moosique.clearSequence();
} else if (command == "Open...") {
// Shows a file chooser. If shown previously, starts in the current directory.
if (directory != null) {
File file = chooser.getSelectedFile();
if(returnVal == JFileChooser.APPROVE_OPTION && isMidiFile(file)) {
directory = chooser.getSelectedFile().getParentFile();
- Moosique.load(chooser.getSelectedFile().getAbsolutePath());
+ if (!Moosique.promptOnUnsavedChanges())
+ Moosique.load(chooser.getSelectedFile().getAbsolutePath());
}
} else if (command == "Save") {
if (!Moosique.save()) showSaveAsDialog();
MooDialog newDialog = new MooDialog(MooDialog.ADD_TRACK);
Moosique.getSequence().createTrack();
} else if (command == "Delete track...") {
-
MooDialog newDialog = new MooDialog(MooDialog.DELETE_TRACK);
-
/* Let the user select a track from a list.
seq = Moosique.getSequence();
seq.deleteTrack(seq.getTracks()[NUMBER]);
MooDialog newDialog = new MooDialog(MooDialog.SET_TEMPO);
} else if (command == "Scale velocity...") {
+ MooDialog newDialog = new MooDialog(MooDialog.SCALE_VELOCITY);
} else if (command == "Transpose...") {
+ MooDialog newDialog = new MooDialog(MooDialog.TRANSPOSE);
} else if (command == "User manual") {
MooDialog manual = new MooDialog(MooDialog.MANUAL);
} else if (command == "About") {
JOptionPane.showMessageDialog(null,
- "Moosique\nversion 1.0\n\nby\n\nRoland Andersson\nMichael Andreen\nBjörn Lanneskog\nEinar Pehrson",
+ "Moosique\nversion 1.0\n\n© 2003\nRoland Andersson\nMichael Andreen\nBjörn Lanneskog\nEinar Pehrson",
"About Moosique",
JOptionPane.INFORMATION_MESSAGE,
new ImageIcon(Moosique.getGUI().logo));