dont ask about revert if there are no modifications

svn: r3686

original commit: 5a8877f161e78afeaa1e31aea551b60a078d2e38
This commit is contained in:
Eli Barzilay 2006-07-11 22:54:47 +00:00
parent da457bdb4b
commit c1a04fa086

View File

@ -1057,19 +1057,20 @@
(let* ([edit (get-editor)]
[b (box #f)]
[filename (send edit get-filename b)])
(if (or (not filename)
(if (or (not filename)
(unbox b))
(bell)
(when (gui-utils:get-choice
(string-constant are-you-sure-revert)
(string-constant yes)
(string-constant no)
(string-constant are-you-sure-revert-title)
#f
this)
(when (or (not (send (get-editor) is-modified?))
(gui-utils:get-choice
(string-constant are-you-sure-revert)
(string-constant yes)
(string-constant no)
(string-constant are-you-sure-revert-title)
#f
this))
(revert))))
#t))
(define/public (revert)
(let* ([edit (get-editor)]
[b (box #f)]