restored the 'add teachpack' menu item in non-teaching languages, but with a message saying that teachpacks don't work and listing the languages where they do.
svn: r7007
This commit is contained in:
parent
b01f462894
commit
e467e8681a
|
@ -2834,7 +2834,26 @@ module browser threading seems wrong.
|
||||||
(update-settings ((teachpack-callbacks-remove tp-callbacks) settings name)))]))
|
(update-settings ((teachpack-callbacks-remove tp-callbacks) settings name)))]))
|
||||||
tp-names))))]
|
tp-names))))]
|
||||||
[else
|
[else
|
||||||
(set! teachpack-items '())])))
|
(set! teachpack-items
|
||||||
|
(list
|
||||||
|
(new menu:can-restore-menu-item%
|
||||||
|
[label (string-constant add-teachpack-menu-item-label)]
|
||||||
|
[parent language-menu]
|
||||||
|
[callback
|
||||||
|
(λ (_1 _2)
|
||||||
|
(message-box (string-constant drscheme)
|
||||||
|
(format (string-constant teachpacks-only-in-languages)
|
||||||
|
(apply
|
||||||
|
string-append
|
||||||
|
(reverse
|
||||||
|
(filter
|
||||||
|
values
|
||||||
|
(map (λ (l)
|
||||||
|
(and
|
||||||
|
(send l capability-value 'drscheme:teachpack-menu-items)
|
||||||
|
(format "\n ~a" (send l get-language-name))))
|
||||||
|
(drscheme:language-configuration:get-languages))))))
|
||||||
|
this))])))])))
|
||||||
|
|
||||||
(define/private (initialize-menus)
|
(define/private (initialize-menus)
|
||||||
(let* ([mb (get-menu-bar)]
|
(let* ([mb (get-menu-bar)]
|
||||||
|
|
|
@ -920,6 +920,9 @@ please adhere to these guidelines:
|
||||||
(teachpack-user-installed "User-installed Teachpacks")
|
(teachpack-user-installed "User-installed Teachpacks")
|
||||||
(install-teachpack... "Install Teachpack...")
|
(install-teachpack... "Install Teachpack...")
|
||||||
(teachpack-already-installed "A teachpack with the name '~a' has already been installed. Overwrite it?")
|
(teachpack-already-installed "A teachpack with the name '~a' has already been installed. Overwrite it?")
|
||||||
|
; ~a is filled with a list of language names. Each name is separated by a newline and is indented two spaces (no commas, no 'and')
|
||||||
|
(teachpacks-only-in-languages "Teachpacks are only available in these languages: ~a")
|
||||||
|
|
||||||
|
|
||||||
;;; Language dialog
|
;;; Language dialog
|
||||||
(introduction-to-language-dialog
|
(introduction-to-language-dialog
|
||||||
|
|
Loading…
Reference in New Issue
Block a user