Reverted package name to 'altosui' from 'AltosUI'
[fw/altos] / altosui / AltosDeviceDialog.java
index e17504e2475580c4c75364ab060391cc1357a425..fa9d0013722ee88e5e48aa3df49e8bbe10bf16bd 100644 (file)
@@ -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<AltosDevice>     usb_devices = AltosUSBDevice.list(product);
-               java.util.List<AltosDevice>     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<AltosDevice>     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;
                }