original commit: 1e27c30b095db83eb8d8a5c0a8e1644967bfc0c1
This commit is contained in:
Robby Findler 2002-02-20 22:34:19 +00:00
parent 64c948451b
commit 5750e2f03e
3 changed files with 22 additions and 11 deletions

View File

@ -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

View File

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

View File

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