method private add_dir dir () =
let f () =
match Cam_misc.select_in_list ~value_in_list: false
~choices: (List.map Filename.basename (self#subdirs dir)) ~title: M.add_dir
(Printf.sprintf "%s/" dir)
with
| None -> ()
| Some new_d ->
let new_d = Filename.concat dir new_d in
if Sys.file_exists new_d then
(
cvs#cvs_add_dir new_d;
self#update_selected_dir
)
else
match GToolbox.question_box
~title: M.add_dir
~buttons: [ M.yes ; M.no ]
(M.should_create_dir new_d)
with
1 ->
cvs#cvs_create_and_add_dir new_d;
self#update_selected_dir
| _ ->
()
in
handle_error f () ()