X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=filetree.ml;h=797c3df17288ce349fb164f8d13d86b221d947f4;hb=e2e705307171a21a413f6ea47baf52d2fb44a6b3;hp=3af820de40040ab086e3234d5dfdc9d1872c4471;hpb=277d7009668cce99d0534d780c3984675bf20cd0;p=guestfs-browser.git diff --git a/filetree.ml b/filetree.ml index 3af820d..797c3df 100644 --- a/filetree.ml +++ b/filetree.ml @@ -24,8 +24,6 @@ open Utils module G = Guestfs -let unique = let i = ref 0 in fun () -> incr i; !i - (* The type of the hidden column used to implement on-demand loading. * We are going to store these in the model as simple ints because that * is easier on the GC. Don't change these numbers! @@ -490,15 +488,56 @@ and disk_usage_dialog tree path0 () = and export_archive_dialog tree path0 () = (* XXX NOT IMPL XXX *) - () +(* let model, _, _, dev, _,_ = tree in + let row = model#get_iter (fst path0) in + let dir = get_pathname tree row in*) + + let title = "Choose output file" in + let dlg = GWindow.file_chooser_dialog ~action:`SAVE ~title ~modal:true () in + + (* Allow the user to select the output format. *) + let strings = ["tar.gz (compressed)"; "tar (uncompressed)"] in + let combo, _ = GEdit.combo_box_text ~strings ~active:0 () in + dlg#set_extra_widget (combo :> GObj.widget); + + dlg#show () and export_checksums_dialog tree path0 () = (* XXX NOT IMPL XXX *) - () +(* let model, _, _, dev, _,_ = tree in + let row = model#get_iter (fst path0) in + let dir = get_pathname tree row in*) + + let title = "Choose output file" in + let dlg = GWindow.file_chooser_dialog ~action:`SAVE ~title ~modal:true () in + + (* Allow the user to select the output algorithm. *) + let strings = + ["crc"; "md5"; "sha1"; "sha224"; "sha256"; "sha384"; "sha512"] in + let combo, _ = GEdit.combo_box_text ~strings ~active:1 () in + dlg#set_extra_widget (combo :> GObj.widget); + + dlg#show () and export_list_dialog tree path0 () = (* XXX NOT IMPL XXX *) - () +(* let model, _, _, dev, _,_ = tree in + let row = model#get_iter (fst path0) in + let dir = get_pathname tree row in*) + + let title = "Choose output file" in + let dlg = GWindow.file_chooser_dialog ~action:`SAVE ~title ~modal:true () in + + (* Notify that the list of strings is \0 separated. *) + let hbox = + let hbox = GPack.hbox () in + ignore (GMisc.image ~stock:`INFO ~packing:hbox#pack ()); + let label = GMisc.label ~text:"The list of filenames is saved to a file with zero byte separators, to allow the full range of characters to be used in the names themselves." ~packing:hbox#pack () in + label#set_line_wrap true; + hbox in + dlg#set_extra_widget (hbox :> GObj.widget); + + dlg#show () and do_export_dialog tree path0 t = (* XXX NOT IMPL XXX *)