mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-06-04 22:17:01 +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 parse_conf_xml = fun vbox ->
|
||||||
let strings = ref [] in
|
let strings = ref [] in
|
||||||
Hashtbl.iter (fun name _ac -> strings := name :: !strings) Utils.aircrafts;
|
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 =
|
let editor =
|
||||||
try Sys.getenv "EDITOR" with _ -> (
|
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 "Simulation";
|
||||||
Gtk_tools.add_to_combo session_combo "Replay";
|
Gtk_tools.add_to_combo session_combo "Replay";
|
||||||
Gtk_tools.add_to_combo session_combo Gtk_tools.combo_separator;
|
Gtk_tools.add_to_combo session_combo Gtk_tools.combo_separator;
|
||||||
Hashtbl.iter
|
let strings = ref [] in
|
||||||
(fun name _session ->
|
Hashtbl.iter (fun name _session -> strings := name :: !strings) sessions;
|
||||||
Gtk_tools.add_to_combo session_combo name)
|
let ordered = List.sort String.compare !strings in
|
||||||
sessions in
|
List.iter (fun name -> Gtk_tools.add_to_combo session_combo name) ordered
|
||||||
|
in
|
||||||
|
|
||||||
register_custom_sessions ();
|
register_custom_sessions ();
|
||||||
Gtk_tools.select_in_combo session_combo "Simulation";
|
Gtk_tools.select_in_combo session_combo "Simulation";
|
||||||
|
|||||||
Reference in New Issue
Block a user