summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2010-09-01 22:56:34 -0700
committerKeith Packard <keithp@keithp.com>2010-09-03 07:04:28 -0700
commitcff0d1ef6b338b3d5ad9450d4d5f95df934cb5e4 (patch)
tree8bc501d047ebc8b5c769569231920ca40adb3f8e
parent8d8980f56a4f2c7d6f2ce667130706e0f04f8ded (diff)
altosui: Post error dialog on invalid ROM config values.
Signed-off-by: Keith Packard <keithp@keithp.com>
-rw-r--r--ao-tools/altosui/AltosRomconfigUI.java11
1 files changed, 10 insertions, 1 deletions
diff --git a/ao-tools/altosui/AltosRomconfigUI.java b/ao-tools/altosui/AltosRomconfigUI.java
index 10b3af80..2134975d 100644
--- a/ao-tools/altosui/AltosRomconfigUI.java
+++ b/ao-tools/altosui/AltosRomconfigUI.java
@@ -134,8 +134,17 @@ public class AltosRomconfigUI
public void actionPerformed(ActionEvent e) {
String cmd = e.getActionCommand();
- if (cmd.equals("ok"))
+ if (cmd.equals("ok")) {
+ AltosRomconfig romconfig = romconfig();
+ if (romconfig == null || !romconfig.valid()) {
+ JOptionPane.showMessageDialog(this,
+ "Invalid serial number or radio calibration value",
+ "Invalid rom configuration",
+ JOptionPane.ERROR_MESSAGE);
+ return;
+ }
selected = true;
+ }
setVisible(false);
}