projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
altoslib: Mark listener as 'not running' on EOF.
[fw/altos]
/
altosui
/
AltosFlightUI.java
diff --git
a/altosui/AltosFlightUI.java
b/altosui/AltosFlightUI.java
index 6af345ea909068c09fdf1cb887badd0e7532b540..d7c8223ef88cc1485f9820f98e2a928106d2cf96 100644
(file)
--- a/
altosui/AltosFlightUI.java
+++ b/
altosui/AltosFlightUI.java
@@
-97,6
+97,7
@@
public class AltosFlightUI extends AltosUIFrame implements AltosFlightDisplay {
public void show(AltosState state, AltosListenerState listener_state) {
status_update.saved_state = state;
public void show(AltosState state, AltosListenerState listener_state) {
status_update.saved_state = state;
+ status_update.saved_listener_state = listener_state;
if (state == null)
state = new AltosState();
if (state == null)
state = new AltosState();
@@
-335,9
+336,14
@@
public class AltosFlightUI extends AltosUIFrame implements AltosFlightDisplay {
AltosUIPreferences.register_font_listener(this);
AltosPreferences.register_units_listener(this);
AltosUIPreferences.register_font_listener(this);
AltosPreferences.register_units_listener(this);
+ status_update = new AltosFlightStatusUpdate(flightStatus);
+
+ flightStatus.start(status_update);
+
addWindowListener(new WindowAdapter() {
@Override
public void windowClosing(WindowEvent e) {
addWindowListener(new WindowAdapter() {
@Override
public void windowClosing(WindowEvent e) {
+ flightStatus.stop();
disconnect();
setVisible(false);
dispose();
disconnect();
setVisible(false);
dispose();
@@
-353,10
+359,6
@@
public class AltosFlightUI extends AltosUIFrame implements AltosFlightDisplay {
thread = new AltosDisplayThread(this, voice, this, reader);
thread = new AltosDisplayThread(this, voice, this, reader);
- status_update = new AltosFlightStatusUpdate(flightStatus);
-
- new javax.swing.Timer(100, status_update).start();
-
thread.start();
}
thread.start();
}