let edit_lang_style ?modal lang =
let d = GWindow.dialog ?modal ~type_hint: `DIALOG ~width: 400 ~height: 400 () in
let ledit = new lang_style_box () in
let f_ok () =
store_lang_style lang;
d#destroy ()
in
let f_cancel () =
read_lang_style lang;
d#destroy ()
in
ledit#set_lang (Some lang);
d#vbox#pack ~expand: true ~fill: true ledit#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 ()