(* Main window state. *)
type window_state = {
window : GWindow.window;
- view : Filetree.t;
+ view : Filetree.tree;
vmcombo : GEdit.combo_box GEdit.text_combo;
refresh_button : GButton.button;
throbber : GMisc.image;
(* Clear the filetree. *)
let clear_view ws =
- Filetree.clear ws.view
+ ws.view#clear ()
(* Callback from Connect -> ... menu items. *)
let rec connect_to ws uri =
debug "root device %s contains %s %s %d.%d" root typ distro major minor;
) data.insp_oses;
- Filetree.add ws.view name data
+ ws.view#add_os name data
let throbber_busy ws () =
(*throbber#set_pixbuf animation*)
vmcombo, refresh_button, throbber, static
and make_filetree ~packing () =
+ (* Create the filetree inside a scrolled window. *)
let sw =
GBin.scrolled_window ~packing ~hpolicy:`AUTOMATIC ~vpolicy:`ALWAYS () in
- Filetree.create ~packing:sw#add ()
+ let tree = new Filetree.tree ~packing:sw#add () in
+
+ (* Wire up the loosely-coupled external components of the filetree.
+ * See the note about signals in {!Filetree.tree} documentation.
+ *)
+ ignore (tree#op_checksum_file
+ ~callback:(Op_checksum_file.checksum_file tree));
+ ignore (tree#op_copy_regvalue
+ ~callback:(Op_copy_regvalue.copy_regvalue tree));
+ ignore (tree#op_disk_usage
+ ~callback:(Op_disk_usage.disk_usage tree));
+ ignore (tree#op_download_as_reg
+ ~callback:(Op_download_as_reg.download_as_reg tree));
+ ignore (tree#op_download_dir_find0
+ ~callback:(Op_download_dir_find0.download_dir_find0 tree));
+ ignore (tree#op_download_dir_tarball
+ ~callback:(Op_download_dir_tarball.download_dir_tarball tree));
+ ignore (tree#op_download_file
+ ~callback:(Op_download_file.download_file tree));
+ ignore (tree#op_file_information
+ ~callback:(Op_file_information.file_information tree));
+ ignore (tree#op_inspection_dialog
+ ~callback:(Op_inspection_dialog.inspection_dialog tree));
+ ignore (tree#op_view_file
+ ~callback:(Op_view_file.view_file tree));
+
+ tree
(* Do what the user asked on the command line. *)
let rec run_cli_request ws = function