shrunk the height of the preferences window

svn: r14528
This commit is contained in:
Robby Findler 2009-04-16 17:18:35 +00:00
parent 7aadcfddfa
commit 0c2c04e168
4 changed files with 63 additions and 25 deletions

View File

@ -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.
#;

View File

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

View File

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

View File

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