diff --git a/collects/drscheme/private/language-configuration.ss b/collects/drscheme/private/language-configuration.ss index d7742f435e..f9bba9187d 100644 --- a/collects/drscheme/private/language-configuration.ss +++ b/collects/drscheme/private/language-configuration.ss @@ -204,7 +204,7 @@ [(disable) (enable! #f)] [(enable) (enable! #t)] [(enable-sync) (enable! enabled?)] - [(execute) (enter-callback)] + [(execute) (enter-callback) (void)] [else (error 'ok-handler "internal error (~e)" msg)])))) (define-values (get-selected-language get-selected-language-settings) diff --git a/collects/drscheme/private/tool-contracts.ss b/collects/drscheme/private/tool-contracts.ss index 3d2cae98c6..cdc2ebdaa2 100644 --- a/collects/drscheme/private/tool-contracts.ss +++ b/collects/drscheme/private/tool-contracts.ss @@ -868,11 +868,13 @@ (is-a?/c area-container<%>) drscheme:language-configuration:language-settings?) ((or/c false/c (is-a?/c top-level-window<%>)) - boolean?) + boolean? + (-> symbol? void?)) drscheme:language-configuration:language-settings?) ((panel button-panel language-setting) ((re-center #f) - (manuals? #f))) + (manuals? #f) + (ok-handler void))) "This procedure accepts two parent panels and" "fills them with the contents of the language dialog." "It is used to include language configuration controls" @@ -886,7 +888,7 @@ "" "The \\var{language-setting} is the default" "language to show in the dialog." - + "" "The \\var{re-center} argument is used when the \\gui{Show Details}" "button is clicked. If that argument is a \\iscmintf{top-level-window}," "the \\gui{Show Details} callback will recenter the window each time" @@ -896,7 +898,13 @@ "in the start up drscheme window and from the Choose Language dialog" "created when drscheme is started up) is shown. If it isn't, the dialog" "does not have the details and on the right-hand side shows the manual" - "ordering for the chosen language. This is used in Help Desk.") + "ordering for the chosen language. This is used in Help Desk." + "" + "\\var{ok-handler} is a function that is in charge of interfacing the OK" + "button. It should accept a symbol message: \\scheme{'enable} and" + "\\scheme{'disable} to toggle the button, and \\scheme{'execute} to run" + "the desired operation. (The language selection dialog also uses an" + "internal \\scheme{'enable-sync} message.)") (drscheme:language:register-capability (->r ([s symbol?]