+ (* quit *)
+ self#setQuitCallback (fun () ->
+ if
+ MatitaGtkMisc.ask_confirmation
+ ~parent:main#toplevel
+ ~title:"Unsaved work!"
+ ~message:("Your work is <b>unsaved</b>!\n\n"^
+ "<i>Do you want to save the script before exiting?</i>")
+ ()
+ then
+ (saveScript ();prerr_endline "SAVE";GMain.Main.quit ())
+ else
+ GMain.Main.quit ());