mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-06-04 13:55:40 +08:00
[supervision] sort AC and session in alphabetic order
This commit is contained in:
@@ -79,7 +79,8 @@ let new_ac_id = fun () ->
|
||||
let parse_conf_xml = fun vbox ->
|
||||
let strings = ref [] in
|
||||
Hashtbl.iter (fun name _ac -> strings := name :: !strings) Utils.aircrafts;
|
||||
Gtk_tools.combo ("" :: !strings) vbox
|
||||
let ordered = List.sort String.compare ("" :: !strings) in
|
||||
Gtk_tools.combo ordered vbox
|
||||
|
||||
let editor =
|
||||
try Sys.getenv "EDITOR" with _ -> (
|
||||
|
||||
@@ -195,10 +195,11 @@ let supervision = fun ?file gui log (ac_combo : Gtk_tools.combo) (target_combo :
|
||||
Gtk_tools.add_to_combo session_combo "Simulation";
|
||||
Gtk_tools.add_to_combo session_combo "Replay";
|
||||
Gtk_tools.add_to_combo session_combo Gtk_tools.combo_separator;
|
||||
Hashtbl.iter
|
||||
(fun name _session ->
|
||||
Gtk_tools.add_to_combo session_combo name)
|
||||
sessions in
|
||||
let strings = ref [] in
|
||||
Hashtbl.iter (fun name _session -> strings := name :: !strings) sessions;
|
||||
let ordered = List.sort String.compare !strings in
|
||||
List.iter (fun name -> Gtk_tools.add_to_combo session_combo name) ordered
|
||||
in
|
||||
|
||||
register_custom_sessions ();
|
||||
Gtk_tools.select_in_combo session_combo "Simulation";
|
||||
|
||||
Reference in New Issue
Block a user