X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=altosui%2FAltosDeviceDialog.java;h=fa9d0013722ee88e5e48aa3df49e8bbe10bf16bd;hp=e17504e2475580c4c75364ab060391cc1357a425;hb=675ccd41e3b668cd4e1d2dd282dd317a00d00151;hpb=44fb71ca3e5bccd5f601fc5a2d5da7292050b1d6 diff --git a/altosui/AltosDeviceDialog.java b/altosui/AltosDeviceDialog.java index e17504e2..fa9d0013 100644 --- a/altosui/AltosDeviceDialog.java +++ b/altosui/AltosDeviceDialog.java @@ -24,7 +24,7 @@ import java.awt.*; import java.awt.event.*; import libaltosJNI.*; -public class AltosDeviceDialog extends JDialog implements ActionListener { +public class AltosDeviceDialog extends AltosDialog implements ActionListener { private AltosDevice value; private JList list; @@ -40,8 +40,10 @@ public class AltosDeviceDialog extends JDialog implements ActionListener { private AltosDevice[] devices() { java.util.List usb_devices = AltosUSBDevice.list(product); - java.util.List bt_devices = Altos.bt_known.list(product); - AltosDevice[] devices = new AltosDevice[usb_devices.size() + bt_devices.size()]; + int num_devices = usb_devices.size(); + java.util.List bt_devices = AltosBTKnown.bt_known().list(product); + num_devices += bt_devices.size(); + AltosDevice[] devices = new AltosDevice[num_devices]; for (int i = 0; i < usb_devices.size(); i++) devices[i] = usb_devices.get(i); @@ -167,7 +169,7 @@ public class AltosDeviceDialog extends JDialog implements ActionListener { if ("select".equals(e.getActionCommand())) value = (AltosDevice)(list.getSelectedValue()); if ("manage".equals(e.getActionCommand())) { - AltosBTManage.show(frame, Altos.bt_known); + AltosBTManage.show(frame, AltosBTKnown.bt_known()); update_devices(); return; }