diff --git a/.gitignore b/.gitignore index 96af5f1..d557b42 100644 --- a/.gitignore +++ b/.gitignore @@ -20,3 +20,6 @@ nbproject/build-impl.xml nbproject/genfiles.properties nbproject/project.properties nbproject/project.xml +moose.icns +Moose-1.0.0.pkg +moose-installer.pkg diff --git a/deploy/moose.jar b/deploy/moose.jar index 3cb6011..6365660 100644 Binary files a/deploy/moose.jar and b/deploy/moose.jar differ diff --git a/src/moose/Main.java b/src/moose/Main.java index 8ff57ec..764b771 100644 --- a/src/moose/Main.java +++ b/src/moose/Main.java @@ -18,7 +18,7 @@ public class Main { // version - public static String version = "1.1.1"; + public static String version = "1.1.2"; // create and instantiate the frames and controllers public static Frame frame = new Frame(); diff --git a/src/moose/controllers/SongController.java b/src/moose/controllers/SongController.java index 1fab635..69e40d3 100644 --- a/src/moose/controllers/SongController.java +++ b/src/moose/controllers/SongController.java @@ -38,7 +38,10 @@ public class SongController { HashMap songs = new HashMap<>(); // hashmap to contain Song objects ArrayList edited_songs = new ArrayList(); // arraylist to contain indices of edited songs to save - public SongController(JTable table) { + public SongController() { + } + + public void setTable(JTable table) { this.table = table; } diff --git a/src/moose/views/Frame.form b/src/moose/views/Frame.form index af8e785..9f74a93 100644 --- a/src/moose/views/Frame.form +++ b/src/moose/views/Frame.form @@ -287,6 +287,7 @@ + diff --git a/src/moose/views/Frame.java b/src/moose/views/Frame.java index 9e53669..d4f6d6e 100644 --- a/src/moose/views/Frame.java +++ b/src/moose/views/Frame.java @@ -36,7 +36,7 @@ public class Frame extends javax.swing.JFrame { Logger logger = new Logger(); // controller, instantiated in constructor - public SongController songController; + public SongController songController = new SongController();; // some graphics ivars ActionListener menuListener; // listener for the popup menu objects @@ -90,7 +90,6 @@ public Frame() { init(); }); } - songController = new SongController(table); } /** @@ -110,7 +109,6 @@ public Frame(File folder) { init(); }); } - songController = new SongController(table); // add the songs in the folder param to start ArrayList files = new ArrayList<>(); @@ -345,13 +343,13 @@ public void setRowIcon(int icon, int row) { row = table.convertRowIndexToModel(row); switch (icon) { case DEFAULT: - model.setValueAt(new ImageIcon(this.getClass().getResource("../../resources/default.jpg")), row, 0); + model.setValueAt(new ImageIcon(this.getClass().getResource("/resources/default.jpg")), row, 0); break; case EDITED: - model.setValueAt(new ImageIcon(this.getClass().getResource("../../resources/edit.png")), row, 0); + model.setValueAt(new ImageIcon(this.getClass().getResource("/resources/edit.png")), row, 0); break; case SAVED: - model.setValueAt(new ImageIcon(this.getClass().getResource("../../resources/check.png")), row, 0); + model.setValueAt(new ImageIcon(this.getClass().getResource("/resources/check.png")), row, 0); break; } } @@ -378,7 +376,7 @@ public boolean addFileToTable(File file) { // add the row to the table model.addRow(new Object[]{ - new ImageIcon(this.getClass().getResource("../../resources/default.png")), // adds the default status icon + new ImageIcon(this.getClass().getResource("/resources/default.png")), // adds the default status icon s.getFile(), // hidden file object s.getFile().getName().replace(".mp3", ""), // actual editable file name s.getTitle(), @@ -598,6 +596,7 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { table.setRowHeight(20); table.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION); table.setShowGrid(true); + songController.setTable(table); table.addMouseListener(new java.awt.event.MouseAdapter() { public void mousePressed(java.awt.event.MouseEvent evt) { tableMousePressed(evt); @@ -1255,6 +1254,12 @@ public void doCommand(String command) { case "clear event log": Main.settings.settingsController.clearEventLog(); break; + case "open error log": + Main.settings.settingsController.openErrorLog(); + break; + case "open event log": + Main.settings.settingsController.openEventLog(); + break; default: JOptionPane.showMessageDialog(this, "Unknown Command!"); break; @@ -1265,7 +1270,7 @@ public void doCommand(String command) { * Show the about dialog, includes name, version, and copyright */ public void showAboutDialog() { - Icon icon = new ImageIcon(this.getClass().getResource("../../resources/moose128.png")); + Icon icon = new ImageIcon(this.getClass().getResource("/resources/moose128.png")); JOptionPane.showMessageDialog(null, "Moose\nVersion: " + Main.version + "\n" + "© Pat Ripley 2018", "About Moose", JOptionPane.PLAIN_MESSAGE, icon);