let edit_source_style_scheme ?modal ?manager
  ?(current=source_style_scheme())
  ?(preview=(fun s ->
        set_source_style_scheme s;
        apply_source_style_scheme_to_registered_buffers s;
        store_style_scheme_selection s)
    )
    () =
  let d = GWindow.dialog ?modal ~type_hint: `DIALOG ~width: 400 ~height: 600 () in
  let box = new source_style_scheme_box ?manager ~current ~preview ()  in
  let f_ok () =
    let s = box#scheme in
    store_style_scheme_selection s; preview s;
    d#destroy ()
  in
  let f_cancel () = preview current; d#destroy ()
  in
  d#vbox#pack ~expand: true ~fill: true box#box;
  d#add_button_stock `OK `OK;
  d#add_button_stock `CANCEL `CANCEL;
  match d#run () with
    `OK -> f_ok ()
  | `CANCEL
  | `DELETE_EVENT -> f_cancel ()