Changed Logging to File icon to a red square (with pencil).

Fixed up notifications as certain conditions would provide incorrect feedback (Logging to file when not connected...)

git-svn-id: https://svn2.assembla.com/svn/romraider/trunk@368 38686702-15cf-42e4-a595-3071df8bf5ea
This commit is contained in:
Dale Schultz 2011-10-28 16:33:42 +00:00
parent ed3a7be42a
commit 72da36f9fa
5 changed files with 18 additions and 16 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 725 B

View File

@ -1,14 +1,14 @@
#!/bin/bash
if [ ! -d "$HOME/.romraider" ]
if [ ! -d "$HOME/.RomRaider" ]
then
mkdir "$HOME/.romraider"
mkdir "$HOME/.RomRaider"
fi
if [ ! -e "$HOME/.romraider/settings.xml" ]
if [ ! -e "$HOME/.RomRaider/settings.xml" ]
then
if [ -e $1/settings.xml ]
then
mv -f $1/settings.xml "$HOME/.romraider/"
mv -f $1/profile_backup.xml "$HOME/.romraider/"
mv -f $1/settings.xml "$HOME/.RomRaider/"
mv -f $1/profile_backup.xml "$HOME/.RomRaider/"
fi
fi
rm -f $1/rr_system.log $1/romraider.log > nul 2>&1

View File

@ -81,10 +81,10 @@ This is the first beta release of the upcoming official 0.5.4b release.
- Moved the COM port Auto Refresh checkbox to the Settings menu.
- Added a Logger startup Progress Bar as loading plugins sometimes takes time.
- Added colour to "Log to File" button. Red when recording and green when not.
* Button colours may not appear correctly as this is platform dependent. Colour
* Button colours may not appear correctly as this is platform dependent. Colours
may show as a border rather than a fill.
Also changed the colours used for the connection state:
* Red = recording to file (used to be green)
* Red Square = recording to file (used to be green)
* Green = connected and ready to record (used to blue)
* Blue = connection to ECU in progress (used to be red)
* Red with X = disconnected (used to be red)

View File

@ -264,6 +264,7 @@ public final class EcuLogger extends AbstractFrame implements MessageListener {
private JWindow startStatus;
private JLabel startText = new JLabel(" Initializing Logger...");
private String HOME = System.getProperty("user.home");
private StatusIndicator statusIndicator;
public EcuLogger(Settings settings) {
super(ECU_LOGGER_TITLE);
@ -1082,12 +1083,14 @@ public final class EcuLogger extends AbstractFrame implements MessageListener {
logToFileButton.setOpaque(true);
logToFileButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent actionEvent) {
if (logToFileButton.isSelected()) {
if (logToFileButton.isSelected() && controller.isStarted()) {
fileUpdateHandler.start();
logToFileButton.setBackground(RED);
} else {
fileUpdateHandler.stop();
if (!controller.isStarted()) statusIndicator.stopped();
logToFileButton.setBackground(GREEN);
logToFileButton.setSelected(false);
}
}
});
@ -1197,7 +1200,7 @@ public final class EcuLogger extends AbstractFrame implements MessageListener {
}
private StatusIndicator buildStatusIndicator() {
StatusIndicator statusIndicator = new StatusIndicator();
statusIndicator = new StatusIndicator();
controller.addListener(statusIndicator);
fileUpdateHandler.addListener(statusIndicator);
return statusIndicator;
@ -1436,10 +1439,9 @@ public final class EcuLogger extends AbstractFrame implements MessageListener {
progressBar.setIndeterminate(false);
progressBar.setOpaque(true);
startText.setOpaque(true);
Border etchedBdr = BorderFactory.createEtchedBorder();
JPanel panel = new JPanel();
panel.setLayout(new BorderLayout());
panel.setBorder(etchedBdr);
panel.setBorder(BorderFactory.createEtchedBorder());
panel.add(progressBar, BorderLayout.CENTER);
panel.add(startText, BorderLayout.SOUTH);
startStatus.getContentPane().add(panel);

View File

@ -30,13 +30,13 @@ import java.awt.BorderLayout;
public final class StatusIndicator extends JPanel implements StatusChangeListener {
private static final long serialVersionUID = -3244690866698807677L;
private final JLabel statusLabel = new JLabel();
private static final String TEXT_CONNECTING = "Connecting...";
private static final String TEXT_READING = "Reading data...";
private static final String TEXT_LOGGING = "Logging to file...";
private static final String TEXT_STOPPED = "Stopped.";
private static final String TEXT_CONNECTING = "Connecting ";
private static final String TEXT_READING = "Reading data ";
private static final String TEXT_LOGGING = "Logging to file ";
private static final String TEXT_STOPPED = "Stopped ";
private static final ImageIcon ICON_CONNECTING = new ImageIcon("./graphics/logger_blue.png");
private static final ImageIcon ICON_READING = new ImageIcon("./graphics/logger_green.png");
private static final ImageIcon ICON_LOGGING = new ImageIcon("./graphics/logger_red.png");
private static final ImageIcon ICON_LOGGING = new ImageIcon("./graphics/logger_recording.png");
private static final ImageIcon ICON_STOPPED = new ImageIcon("./graphics/logger_stop.png");
public StatusIndicator() {