User-Close
(defmethod user-close ((window paint-pane))
(if (not (buffer-ischanged window))
(progn (call-next-method)
(user-close (parent window)))
(case (pop-up-message-dialog window "Close"
"The file has changed. Save the changes?"
warning-icon "Yes" "No" "Cancel")
(when (buffer-ischanged window)
(user-close (parent window)))
(user-close (parent window)))