games: fix "About Games" menu item
Merge to v6.0
(cherry picked from commit f4b051a1e2
)
This commit is contained in:
parent
2f5b95b389
commit
6aa10f08b6
|
@ -1,6 +1,6 @@
|
||||||
#lang racket/gui
|
#lang racket/gui
|
||||||
|
(require setup/getinfo
|
||||||
(require setup/getinfo "show-help.rkt")
|
net/sendurl)
|
||||||
|
|
||||||
(define-struct game (file name set icon))
|
(define-struct game (file name set icon))
|
||||||
|
|
||||||
|
@ -87,7 +87,25 @@
|
||||||
(sort buttons (lambda (x y) (< (send x min-width) (send y min-width)))))
|
(sort buttons (lambda (x y) (< (send x min-width) (send y min-width)))))
|
||||||
(send panel change-children (lambda (l) sorted)))
|
(send panel change-children (lambda (l) sorted)))
|
||||||
|
|
||||||
(define show-games-help (show-help '("games") "About PLT Games"))
|
(define (show-games-help)
|
||||||
|
(with-handlers ([exn:fail? (lambda (exn)
|
||||||
|
(message-box
|
||||||
|
"Error"
|
||||||
|
(~a "Could not open help.\n"
|
||||||
|
(if (exn:missing-module? exn)
|
||||||
|
"Support for documentation may not be installed.\n"
|
||||||
|
"")
|
||||||
|
"\n"
|
||||||
|
(exn-message exn))
|
||||||
|
#f
|
||||||
|
'(ok stop)))])
|
||||||
|
(define-values (path anchor)
|
||||||
|
((dynamic-require 'scribble/xref 'xref-tag->path+anchor)
|
||||||
|
((dynamic-require 'setup/xref 'load-collections-xref))
|
||||||
|
((dynamic-require 'scribble/tag 'make-section-tag)
|
||||||
|
"top"
|
||||||
|
#:doc '(lib "games/scribblings/games.scrbl"))))
|
||||||
|
(send-url/file path #:fragment anchor)))
|
||||||
|
|
||||||
(application-about-handler show-games-help)
|
(application-about-handler show-games-help)
|
||||||
(application-preferences-handler
|
(application-preferences-handler
|
||||||
|
|
|
@ -61,7 +61,7 @@
|
||||||
16 32 0))
|
16 32 0))
|
||||||
(send t insert #\space))])
|
(send t insert #\space))])
|
||||||
(loop)))))
|
(loop)))))
|
||||||
'text)
|
#:mode 'text)
|
||||||
(when verbatim?
|
(when verbatim?
|
||||||
(send t change-style
|
(send t change-style
|
||||||
(make-object style-delta% 'change-family 'modern)
|
(make-object style-delta% 'change-family 'modern)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user