fix bashism that prevents building with /bin/sh->/bin/dash
[fw/altos] / altosui / AltosIgniteUI.java
index 806b87b9d4e9fcdb60d7eb27a1d4e6c508461b52..b215c22865604fd0631109e5b03b6ecd8000f6df 100644 (file)
@@ -122,8 +122,7 @@ public class AltosIgniteUI
        void ignite_exception(Exception e) {
                if (e instanceof FileNotFoundException) {
                        JOptionPane.showMessageDialog(owner,
-                                                     String.format("Cannot open device \"%s\"",
-                                                                   device.toShortString()),
+                                                     ((FileNotFoundException) e).getMessage(),
                                                      "Cannot open target device",
                                                      JOptionPane.ERROR_MESSAGE);
                } else if (e instanceof AltosSerialInUseException) {
@@ -341,8 +340,8 @@ public class AltosIgniteUI
                c.fill = GridBagConstraints.NONE;
                c.anchor = GridBagConstraints.CENTER;
                c.insets = i;
-               c.weightx = 1;
-               c.weighty = 1;
+               c.weightx = 0;
+               c.weighty = 0;
 
                c.gridx = 0;
                c.gridy = 0;
@@ -412,7 +411,6 @@ public class AltosIgniteUI
                close.addActionListener(this);
                close.setActionCommand("close");
                        
-
                pack();
                setLocationRelativeTo(owner);