method add_button : string -> ('a option -> (unit -> unit) -> unit) -> unit =
fun label f ->
let w = GButton.button ~label ~packing: self#buttons_box#pack () in
let g () =
match view#selection#get_selected_rows with
[] -> f None (fun () -> self#update)
| path :: _ ->
let row = store#get_iter path in
f (Some (store#get ~row ~column: datacol)) (fun () -> self#update)
in
ignore (w#connect#clicked g)