X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=altosuilib%2FAltosFlashUI.java;h=6b78aea7f69a2706a3e2d439159ec2ecfe42a6f5;hb=3af81a45be69b4693396de4a5e2c386be566b933;hp=e61b397337c8b35828e7397746496fabe2764109;hpb=52149fd81df45f37f5097850795f290f463c43ef;p=fw%2Faltos diff --git a/altosuilib/AltosFlashUI.java b/altosuilib/AltosFlashUI.java index e61b3973..6b78aea7 100644 --- a/altosuilib/AltosFlashUI.java +++ b/altosuilib/AltosFlashUI.java @@ -64,8 +64,7 @@ public class AltosFlashUI "telemetrum-v1", "telemini-v1", "telenano", - "teleshield", - "teleterra" + "teleshield" }; private static final String[] pair_programmed_devices = { @@ -78,8 +77,7 @@ public class AltosFlashUI "TeleMetrum-v1", "TeleMini-v1", "TeleNano", - "TeleShield", - "TeleTerra" + "TeleShield" }; private boolean is_pair_programmed() { @@ -133,7 +131,7 @@ public class AltosFlashUI Insets il = new Insets(4,4,4,4); Insets ir = new Insets(4,4,4,4); - pane = getContentPane(); + pane = getScrollablePane(); pane.setLayout(new GridBagLayout()); c = new GridBagConstraints(); @@ -210,9 +208,18 @@ public class AltosFlashUI public AltosHexfileFilter(String usb_product) { int l; + int dash; /* Trim off any trailing variants (1.0a vs 1.0) */ - for (l = usb_product.length(); l > 0; l--) { + for (dash = usb_product.length(); dash > 0; dash--) { + char c = usb_product.charAt(dash-1); + if (c == '-') + break; + } + if (dash == 0) + dash = usb_product.length(); + + for (l = usb_product.length(); l > dash; l--) { char c = usb_product.charAt(l-1); if (c < 'a' || 'z' < c) break; @@ -639,7 +646,7 @@ public class AltosFlashUI super(in_owner, "Open Flash Target Device", true); owner = in_owner; - Container pane = getContentPane(); + Container pane = getScrollablePane(); GridBagConstraints c = new GridBagConstraints(); Insets i = new Insets(4,4,4,4);