diff options
author | Keith Packard <keithp@keithp.com> | 2014-09-13 15:52:56 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2014-09-13 15:59:50 -0700 |
commit | 9dc426756742fb967fdd21e1fcec54edeb4b12ac (patch) | |
tree | cfaf600c3d8c6a66bc1f821914f7abe08b38bf00 /altosui/AltosUI.java | |
parent | 75d5368cb2a95f3f7385952669a14765460f549d (diff) |
altosui: Bring up main window when doing --replay or --graph
This shows the main window when replaying or graphing files so that
you can interact with that, changing the global configuration or doing
other stuff.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'altosui/AltosUI.java')
-rw-r--r-- | altosui/AltosUI.java | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/altosui/AltosUI.java b/altosui/AltosUI.java index cc1cf6f2..a1bc0dbb 100644 --- a/altosui/AltosUI.java +++ b/altosui/AltosUI.java @@ -471,7 +471,6 @@ public class AltosUI extends AltosUIFrame { if (reader == null) return false; AltosFlightUI flight_ui = new AltosFlightUI(new AltosVoice(), reader); - flight_ui.set_exit_on_close(); return true; } @@ -559,9 +558,9 @@ public class AltosUI extends AltosUIFrame { public static void help(int code) { System.out.printf("Usage: altosui [OPTION]... [FILE]...\n"); System.out.printf(" Options:\n"); - System.out.printf(" --fetchmaps <lat> <lon>\tpre-fetch maps for site map view\n"); System.out.printf(" --replay <filename>\t\trelive the glory of past flights \n"); System.out.printf(" --graph <filename>\t\tgraph a flight\n"); + System.out.printf(" --summary <filename>\t\tText summary of a flight\n"); System.out.printf(" --csv\tgenerate comma separated output for spreadsheets, etc\n"); System.out.printf(" --kml\tgenerate KML output for use with Google Earth\n"); System.exit(code); @@ -574,10 +573,11 @@ public class AltosUI extends AltosUIFrame { UIManager.setLookAndFeel(AltosUIPreferences.look_and_feel()); } catch (Exception e) { } + AltosUI altosui = null; + /* Handle batch-mode */ if (args.length == 0) { - AltosUI altosui = new AltosUI(); - + altosui = new AltosUI(); java.util.List<AltosDevice> devices = AltosUSBDevice.list(Altos.product_basestation); if (devices != null) for (AltosDevice device : devices) @@ -615,10 +615,14 @@ public class AltosUI extends AltosUIFrame { switch (process) { case process_none: case process_graph: + if (altosui == null) + altosui = new AltosUI(); if (!process_graph(file)) ++errors; break; case process_replay: + if (altosui == null) + altosui = new AltosUI(); if (!process_replay(file)) ++errors; break; |