dont ask about revert if there are no modifications
svn: r3686
This commit is contained in:
parent
01e534d059
commit
5a8877f161
|
@ -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)]
|
||||
|
|
Loading…
Reference in New Issue
Block a user