mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-06-08 02:15:53 +08:00
tree settings working only the scroll is missing
This commit is contained in:
@@ -147,3 +147,6 @@ let remove_selected_from_tree = fun (tree : tree) ->
|
||||
let (store, _) = tree_model tree in
|
||||
List.iter (fun r -> ignore (store#remove r#iter)) selected
|
||||
|
||||
let clear_tree = fun (tree : tree) ->
|
||||
let (store, _) = tree_model tree in
|
||||
store#clear ()
|
||||
|
||||
@@ -71,3 +71,4 @@ val tree_values : tree -> string
|
||||
val get_selected_in_tree : tree -> GTree.row_reference list
|
||||
val add_to_tree : tree -> string -> unit
|
||||
val remove_selected_from_tree : tree -> unit
|
||||
val clear_tree : tree -> unit
|
||||
|
||||
@@ -229,9 +229,11 @@ let ac_combo_handler = fun gui (ac_combo:Gtk_tools.combo) target_combo ->
|
||||
List.iter (fun (a, _subdir, label, _, _, _, _) ->
|
||||
match label with
|
||||
Label l -> l#set_text (value a)
|
||||
| Tree t -> let names = Str.split regexp_space (value a) in
|
||||
Printf.printf "%d\n" (List.length names); flush stdout;
|
||||
List.iter (fun n -> prerr_endline n; Gtk_tools.add_to_tree t n) names
|
||||
| Tree t ->
|
||||
ignore (Gtk_tools.clear_tree tree_set);
|
||||
let names = Str.split regexp_space (value a) in
|
||||
Printf.printf "%d\n" (List.length names); flush stdout;
|
||||
List.iter (fun n -> prerr_endline n; Gtk_tools.add_to_tree t n) names
|
||||
) (ac_files gui model);
|
||||
let ac_id = ExtXml.attrib aircraft "ac_id"
|
||||
and gui_color = ExtXml.attrib_or_default aircraft "gui_color" "white" in
|
||||
|
||||
Reference in New Issue
Block a user