...
original commit: 1e27c30b095db83eb8d8a5c0a8e1644967bfc0c1
This commit is contained in:
parent
64c948451b
commit
5750e2f03e
|
@ -45,17 +45,27 @@
|
|||
|
||||
(inherit get-filename save-file)
|
||||
(define/public save-file/gui-error
|
||||
(opt-lambda ([filename #f]
|
||||
(opt-lambda ([input-filename #f]
|
||||
[fmt 'same]
|
||||
[show-errors? #t])
|
||||
(let ([result (save-file filename fmt #f)])
|
||||
(unless result
|
||||
(when show-errors?
|
||||
(message-box
|
||||
(string-constant error-saving)
|
||||
(format (string-constant error-saving-file/name)
|
||||
(get-filename)))))
|
||||
result)))
|
||||
(let ([filename (if (or (not input-filename)
|
||||
(equal? input-filename ""))
|
||||
(let ([internal-filename (get-filename)])
|
||||
(if (or (not internal-filename)
|
||||
(equal? internal-filename ""))
|
||||
(get-file)
|
||||
internal-filename))
|
||||
input-filename)])
|
||||
(if filename
|
||||
(let ([result (save-file filename fmt #f)])
|
||||
(unless result
|
||||
(when show-errors?
|
||||
(message-box
|
||||
(string-constant error-saving)
|
||||
(format (string-constant error-saving-file/name)
|
||||
filename))))
|
||||
result)
|
||||
#f))))
|
||||
|
||||
(inherit refresh-delayed?
|
||||
get-canvas
|
||||
|
|
|
@ -154,7 +154,7 @@
|
|||
(super-instantiate ())
|
||||
(accept-drop-files #t)
|
||||
|
||||
(make-object menu% (string-constant windows-menu-label)
|
||||
(make-object menu:can-restore-underscore-menu% (string-constant windows-menu-label)
|
||||
(make-object (get-menu-bar%) this))
|
||||
(reorder-menus this)
|
||||
(send (group:get-the-frame-group) insert-frame this)
|
||||
|
|
|
@ -43,7 +43,8 @@
|
|||
(and menu-bar
|
||||
(let ([menus (send menu-bar get-items)])
|
||||
(ormap (lambda (x)
|
||||
(if (string=? (string-constant windows-menu-label) (send x get-label))
|
||||
(if (string=? (string-constant windows-menu)
|
||||
(send x get-plain-label))
|
||||
x
|
||||
#f))
|
||||
menus)))))]
|
||||
|
|
Loading…
Reference in New Issue
Block a user