diff --git a/collects/drscheme/private/main.ss b/collects/drscheme/private/main.ss index 9068fe5f89..5748249977 100644 --- a/collects/drscheme/private/main.ss +++ b/collects/drscheme/private/main.ss @@ -226,6 +226,7 @@ null list?) + (drscheme:font:setup-preferences) (color-prefs:add-background-preferences-panel) (scheme:add-preferences-panel) @@ -233,6 +234,7 @@ (preferences:add-editor-checkbox-panel) (preferences:add-warnings-checkbox-panel) (preferences:add-scheme-checkbox-panel) +(preferences:add-general-checkbox-panel) (let ([make-check-box (λ (pref-sym string parent) @@ -245,7 +247,7 @@ (send checkbox get-value))))]) (preferences:add-callback pref-sym (λ (p v) (send q set-value v))) (send q set-value (preferences:get pref-sym))))]) - (preferences:add-to-editor-checkbox-panel + (preferences:add-to-general-checkbox-panel (λ (editor-panel) (make-check-box 'drscheme:open-in-tabs (string-constant open-files-in-tabs) @@ -264,7 +266,11 @@ (make-check-box 'drscheme:module-language-first-line-special? (string-constant ml-always-show-#lang-line) - editor-panel) + editor-panel))) + + (preferences:add-to-editor-checkbox-panel + (λ (editor-panel) + (void) ;; come back to this one. #; diff --git a/collects/framework/main.ss b/collects/framework/main.ss index 0f16c0fc9d..c85f5de883 100644 --- a/collects/framework/main.ss +++ b/collects/framework/main.ss @@ -198,6 +198,12 @@ @{Adds a preferences panel for configuring options related to editing.}) + (proc-doc/names + preferences:add-general-checkbox-panel + (-> void?) + () + @{Adds a catch-all preferences panel for options.}) + (proc-doc/names preferences:add-warnings-checkbox-panel (-> void?) @@ -232,7 +238,15 @@ (((is-a?/c vertical-panel%) . -> . void?) . -> . void?) (proc) @{Saves @scheme[proc] until the preferences panel is created, when it - is called with the Echeme preferences panel to add new children to + is called with the editor preferences panel to add new children to + the panel.}) + + (proc-doc/names + preferences:add-to-general-checkbox-panel + (((is-a?/c vertical-panel%) . -> . void?) . -> . void?) + (proc) + @{Saves @scheme[proc] until the preferences panel is created, when it + is called with the general preferences panel to add new children to the panel.}) (proc-doc/names diff --git a/collects/framework/private/preferences.ss b/collects/framework/private/preferences.ss index 5bb3db1dde..c2a10f4065 100644 --- a/collects/framework/private/preferences.ss +++ b/collects/framework/private/preferences.ss @@ -227,8 +227,9 @@ the state transitions / contracts are: (super show on?)) (super-new))] [frame - (make-object frame-stashed-prefs% - (string-constant preferences))] + (new frame-stashed-prefs% + [label (string-constant preferences)] + [height 200])] [build-ppanel-tree (λ (ppanel tab-panel single-panel) (send tab-panel append (ppanel-name ppanel)) @@ -310,6 +311,11 @@ the state transitions / contracts are: (let ([old editor-panel-procs]) (λ (parent) (old parent) (f parent))))) + (define (add-to-general-checkbox-panel f) + (set! general-panel-procs + (let ([old general-panel-procs]) + (λ (parent) (old parent) (f parent))))) + (define (add-to-warnings-checkbox-panel f) (set! warnings-panel-procs (let ([old warnings-panel-procs]) @@ -317,6 +323,7 @@ the state transitions / contracts are: (define scheme-panel-procs void) (define editor-panel-procs void) + (define general-panel-procs void) (define warnings-panel-procs void) (define (add-checkbox-panel label proc) @@ -394,21 +401,8 @@ the state transitions / contracts are: (list (string-constant editor-prefs-panel-label) (string-constant general-prefs-panel-label)) (λ (editor-panel) - (make-recent-items-slider editor-panel) - (make-check editor-panel - 'framework:autosaving-on? - (string-constant auto-save-files) - values values) - (make-check editor-panel 'framework:backup-files? (string-constant backup-files) values values) (make-check editor-panel 'framework:delete-forward? (string-constant map-delete-to-backspace) not not) - (make-check editor-panel 'framework:show-status-line (string-constant show-status-line) values values) - (make-check editor-panel 'framework:col-offsets (string-constant count-columns-from-one) values values) - (make-check editor-panel - 'framework:display-line-numbers - (string-constant display-line-numbers) - values values) - (make-check editor-panel 'framework:auto-set-wrap? (string-constant wrap-words-in-editor-buffers) @@ -432,13 +426,7 @@ the state transitions / contracts are: 'framework:coloring-active (string-constant online-coloring-active) values values) - (unless (eq? (system-type) 'unix) - (make-check editor-panel - 'framework:print-output-mode - (string-constant automatically-to-ps) - (λ (b) - (if b 'postscript 'standard)) - (λ (n) (eq? 'postscript n)))) + (make-check editor-panel 'framework:anchored-search (string-constant find-anchor-based) @@ -454,6 +442,34 @@ the state transitions / contracts are: (editor-panel-procs editor-panel))))]) (add-editor-checkbox-panel))) + (define (add-general-checkbox-panel) + (letrec ([add-general-checkbox-panel + (λ () + (set! add-general-checkbox-panel void) + (add-checkbox-panel + (list (string-constant general-prefs-panel-label)) + (λ (editor-panel) + (make-recent-items-slider editor-panel) + (make-check editor-panel + 'framework:autosaving-on? + (string-constant auto-save-files) + values values) + (make-check editor-panel 'framework:backup-files? (string-constant backup-files) values values) + (make-check editor-panel 'framework:show-status-line (string-constant show-status-line) values values) + (make-check editor-panel 'framework:col-offsets (string-constant count-columns-from-one) values values) + (make-check editor-panel + 'framework:display-line-numbers + (string-constant display-line-numbers) + values values) + (unless (eq? (system-type) 'unix) + (make-check editor-panel + 'framework:print-output-mode + (string-constant automatically-to-ps) + (λ (b) + (if b 'postscript 'standard)) + (λ (n) (eq? 'postscript n)))))))]) + (add-general-checkbox-panel))) + (define (add-warnings-checkbox-panel) (letrec ([add-warnings-checkbox-panel (λ () diff --git a/collects/framework/private/sig.ss b/collects/framework/private/sig.ss index 32e5a03316..ec23b69f8f 100644 --- a/collects/framework/private/sig.ss +++ b/collects/framework/private/sig.ss @@ -74,10 +74,12 @@ add-font-panel add-editor-checkbox-panel + add-general-checkbox-panel add-warnings-checkbox-panel add-scheme-checkbox-panel add-to-editor-checkbox-panel + add-to-general-checkbox-panel add-to-warnings-checkbox-panel add-to-scheme-checkbox-panel