altosui: Display callsign in connecting message window
authorKeith Packard <keithp@keithp.com>
Sun, 10 Feb 2013 22:18:16 +0000 (14:18 -0800)
committerKeith Packard <keithp@keithp.com>
Sun, 10 Feb 2013 22:18:16 +0000 (14:18 -0800)
When waiting for the remote end to respond, display the callsign along
with the frequency so that the user remembers that it's important to
set that too.

Signed-off-by: Keith Packard <keithp@keithp.com>
altosui/AltosSerial.java
altosui/AltosUI.java

index 710aa1450b762d995a75744af1fdfa58eb5b786e..e869f1ab1ac3688a9eaa6c964c6cd64729af2e0b 100644 (file)
@@ -72,7 +72,7 @@ public class AltosSerial extends AltosLink  {
                Object[] options = { "Cancel" };
 
                JOptionPane     pane = new JOptionPane();
-               pane.setMessage(String.format("Connecting to %s, %7.3f MHz", device.toShortString(), frequency));
+               pane.setMessage(String.format("Connecting to %s, %7.3f MHz as %s", device.toShortString(), frequency, callsign));
                pane.setOptions(options);
                pane.setInitialValue(null);
 
index 49e3097e34b99843669fd4f33d360b9f489563b8..a6742f2f360d04e47b3de019a18602fead237d19 100644 (file)
@@ -48,7 +48,7 @@ public class AltosUI extends AltosUIFrame {
                } catch (FileNotFoundException ee) {
                        JOptionPane.showMessageDialog(AltosUI.this,
                                                      ee.getMessage(),
-                                                     "Cannot open target device",
+                                                     String.format ("Cannot open %s", device.toShortString()),
                                                      JOptionPane.ERROR_MESSAGE);
                } catch (AltosSerialInUseException si) {
                        JOptionPane.showMessageDialog(AltosUI.this,
@@ -58,17 +58,17 @@ public class AltosUI extends AltosUIFrame {
                                                      JOptionPane.ERROR_MESSAGE);
                } catch (IOException ee) {
                        JOptionPane.showMessageDialog(AltosUI.this,
-                                                     device.toShortString(),
-                                                     "Unkonwn I/O error",
+                                                     String.format ("Unknown I/O error on %s", device.toShortString()),
+                                                     "Unknown I/O error",
                                                      JOptionPane.ERROR_MESSAGE);
                } catch (TimeoutException te) {
                        JOptionPane.showMessageDialog(this,
-                                                     device.toShortString(),
+                                                     String.format ("Timeout on %s", device.toShortString()),
                                                      "Timeout error",
                                                      JOptionPane.ERROR_MESSAGE);
                } catch (InterruptedException ie) {
                        JOptionPane.showMessageDialog(this,
-                                                     device.toShortString(),
+                                                     String.format("Interrupted %s", device.toShortString()),
                                                      "Interrupted exception",
                                                      JOptionPane.ERROR_MESSAGE);
                }