Added ECU definition update link, reorganized menu bar

git-svn-id: http://svn.3splooges.com/romraider-arch/trunk@321 d2e2e1cd-ba16-0410-be16-b7c4453c7c2d
This commit is contained in:
Jared Gould 2006-11-02 02:40:52 +00:00
parent b232f65861
commit a1fc9a78de
3 changed files with 107 additions and 84 deletions

View File

@ -43,8 +43,8 @@ public class ECUEditor extends JFrame implements WindowListener, PropertyChangeL
private RomTreeRootNode imageRoot = new RomTreeRootNode("Open Images");
private RomTree imageList = new RomTree(imageRoot);
private Settings settings = new Settings();
private String version = "0.3.2 Beta";
private String versionDate = "8/12/2006";
private String version = "0.4.0 Beta";
private String versionDate = "11/03/2006";
private String titleText = "Enginuity v" + version;
public MDIDesktopPane rightPanel = new MDIDesktopPane();
private Rom lastSelectedRom = null;

View File

@ -13,6 +13,7 @@ public class Settings implements Serializable {
private boolean windowMaximized = false;
private String romRevisionURL = "http://www.scoobypedia.co.uk/index.php/Knowledge/ECUVersionCompatibilityList";
private String ecuDefsURL = "http://www.enginuity.org/viewtopic.php?t=360";
private String supportURL = "http://www.enginuity.org";
private String releaseNotes = "release notes.txt";
private String recentVersion = "x";
@ -326,4 +327,12 @@ public class Settings implements Serializable {
public void setLoggerProfileFilePath(String loggerProfileFilePath) {
this.loggerProfileFilePath = loggerProfileFilePath;
}
public String getEcuDefsURL() {
return ecuDefsURL;
}
public void setEcuDefsURL(String ecuDefsURL) {
this.ecuDefsURL = ecuDefsURL;
}
}

View File

@ -1,5 +1,6 @@
package enginuity.swing;
import com.centerkey.utils.BareBonesBrowserLaunch;
import enginuity.ECUEditor;
import enginuity.definitions.DefinitionEditor;
import enginuity.logger.EcuLogger;
@ -23,10 +24,13 @@ public class ECUEditorMenuBar extends JMenuBar implements ActionListener {
private JMenuItem closeAll = new JMenuItem("Close All Images");
private JMenuItem exit = new JMenuItem("Exit");
private JMenu editMenu = new JMenu("Edit");
private JMenu definitionMenu = new JMenu("ECU Definitions");
private JMenuItem defManager = new JMenuItem("ECU Definition Manager");
private JMenuItem settings = new JMenuItem("Settings");
private JMenuItem editDefinition = new JMenuItem("Edit ECU Definitions");
private JMenuItem updateDefinition = new JMenuItem("Update ECU Definitions");
private JMenu editMenu = new JMenu("Edit");
private JMenuItem settings = new JMenuItem("Enginuity Settings");
private JMenu viewMenu = new JMenu("View");
private JMenuItem romProperties = new JMenuItem("ECU Image Properties");
@ -78,16 +82,22 @@ public class ECUEditorMenuBar extends JMenuBar implements ActionListener {
// edit menu items
add(editMenu);
editMenu.setMnemonic('E');
editMenu.add(settings);
settings.addActionListener(this);
// ecu def menu items
add(definitionMenu);
definitionMenu.setMnemonic('D');
defManager.setMnemonic('D');
editDefinition.setMnemonic('E');
updateDefinition.setMnemonic('U');
settings.setMnemonic('S');
editMenu.add(defManager);
editMenu.add(editDefinition);
editMenu.add(new JSeparator());
editMenu.add(settings);
definitionMenu.add(defManager);
definitionMenu.add(editDefinition);
definitionMenu.add(updateDefinition);
defManager.addActionListener(this);
editDefinition.addActionListener(this);
settings.addActionListener(this);
updateDefinition.addActionListener(this);
// view menu items
add(viewMenu);
@ -246,6 +256,10 @@ public class ECUEditorMenuBar extends JMenuBar implements ActionListener {
} else if (e.getSource() == openLogger) {
EcuLogger.startLogger(DISPOSE_ON_CLOSE, parent.getSettings());
} else if (e.getSource() == updateDefinition) {
BareBonesBrowserLaunch.openURL(
parent.getSettings().getEcuDefsURL());
}
}