tree settings working only the scroll is missing

This commit is contained in:
Gautier Hattenberger
2010-12-19 12:35:26 +01:00
parent 9dd5695387
commit cceb506697
3 changed files with 9 additions and 3 deletions
+3
View File
@@ -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 ()
+1
View File
@@ -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
+5 -3
View File
@@ -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