summaryrefslogtreecommitdiff
path: root/altosui/AltosUI.java
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2011-04-19 08:43:40 -0700
committerKeith Packard <keithp@keithp.com>2011-04-19 08:43:40 -0700
commit17f38e045fcd8ca0224095c0b2b7b098df77a8d8 (patch)
tree07c49d1151a54d3176f2356b55b6f9f129305b9c /altosui/AltosUI.java
parentf249e5926f5fd9f86c41e7f0a414193533d4d8b0 (diff)
altosui: Use persistent list of bluetooth devices for device dialogs
Store a list of known bluetooth devices as preferences. Always include those in device dialogs with an option to go browse for more devices in both the device dialog and the Configure AltosUI dialog. Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'altosui/AltosUI.java')
-rw-r--r--altosui/AltosUI.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/altosui/AltosUI.java b/altosui/AltosUI.java
index 4b808c41..7955c1c2 100644
--- a/altosui/AltosUI.java
+++ b/altosui/AltosUI.java
@@ -99,7 +99,7 @@ public class AltosUI extends JFrame {
if (imgURL != null)
setIconImage(new ImageIcon(imgURL).getImage());
- AltosPreferences.init(this);
+ AltosPreferences.set_component(this);
pane = getContentPane();
gridbag = new GridBagLayout();
@@ -397,9 +397,9 @@ public class AltosUI extends JFrame {
AltosUI altosui = new AltosUI();
altosui.setVisible(true);
- AltosDevice[] devices = AltosUSBDevice.list(Altos.product_basestation);
- for (int i = 0; i < devices.length; i++)
- altosui.telemetry_window(devices[i]);
+ java.util.List<AltosDevice> devices = AltosUSBDevice.list(Altos.product_basestation);
+ for (AltosDevice device : devices)
+ altosui.telemetry_window(device);
}
}
}