dont ask about revert if there are no modifications

svn: r3686
This commit is contained in:
Eli Barzilay 2006-07-11 22:54:47 +00:00
parent 01e534d059
commit 5a8877f161

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)]