altosui: Tell serial device which frame to use for timeout dialogs
authorKeith Packard <keithp@keithp.com>
Sun, 27 Mar 2011 07:46:19 +0000 (00:46 -0700)
committerKeith Packard <keithp@keithp.com>
Sun, 27 Mar 2011 07:46:19 +0000 (00:46 -0700)
For the timeout dialog to appear, a frame must be configured for it to
appear near. This patch sends the frame from the eeprom download
functions to the serial code. That path doesn't yet work as the eeprom
download is still trying to talk to the serial device from the swing
event thread, which prevents the cancel dialog from working.

Signed-off-by: Keith Packard <keithp@keithp.com>
altosui/AltosEepromDownload.java
altosui/AltosEepromManage.java

index a03d2b43c952e963cc470a947c25c9bce0c268ec..fad1646072e2890604773c14f31ab51594e4f03b 100644 (file)
@@ -328,6 +328,7 @@ public class AltosEepromDownload implements Runnable {
 
                frame = given_frame;
                serial_line = given_serial_line;
 
                frame = given_frame;
                serial_line = given_serial_line;
+               serial_line.set_frame(frame);
                remote = given_remote;
                flights = given_flights;
                success = false;
                remote = given_remote;
                flights = given_flights;
                success = false;
index b12d95fa0c48b5b0064205cbbced922f78a80ef0..fe1db9c7dd62742ac93d86927765cf7d5f0ec6b5 100644 (file)
@@ -106,6 +106,8 @@ public class AltosEepromManage implements ActionListener {
                                if (!device.matchProduct(AltosDevice.product_telemetrum))
                                        remote = true;
 
                                if (!device.matchProduct(AltosDevice.product_telemetrum))
                                        remote = true;
 
+                               serial_line.set_frame(frame);
+
                                flights = new AltosEepromList(serial_line, remote);
 
                                if (flights.size() == 0) {
                                flights = new AltosEepromList(serial_line, remote);
 
                                if (flights.size() == 0) {