]> ruin.nu Git - moosique.git/blobdiff - MooMenu.java
nu är även den fina scale velocity dialogen färdig
[moosique.git] / MooMenu.java
index 3b1e9fabb3f637abeceb02a07626c8b82d3f7662..9062f2d51902820a9c2aa2ea7792ecdc2162d467 100644 (file)
@@ -152,7 +152,7 @@ public class MooMenu extends JMenuBar implements ActionListener {
                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) {
@@ -167,7 +167,8 @@ public class MooMenu extends JMenuBar implements ActionListener {
                        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();
@@ -220,16 +221,19 @@ public class MooMenu extends JMenuBar implements ActionListener {
                } else if (command == "Set time signature...") {
                
                } else if (command == "Set tempo...") {
+                       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));