From 1fca26c61db757657d0d364bd32d938ab17ec6c3 Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Wed, 24 May 2006 18:03:10 +0000 Subject: [PATCH] * Made DrScheme show tools sorted by spec paths, and not show # when there is no name * Added tool-names entries for tools that were missing it svn: r3035 --- collects/algol60/info.ss | 3 +- collects/drscheme/private/app.ss | 74 ++++++++++++++++---------------- collects/guibuilder/info.ss | 4 +- collects/profj/info.ss | 13 +++--- collects/profjWizard/info.ss | 11 ++--- collects/xml/info.ss | 8 +--- 6 files changed, 55 insertions(+), 58 deletions(-) diff --git a/collects/algol60/info.ss b/collects/algol60/info.ss index 5040dca0eb..7b4504d88f 100644 --- a/collects/algol60/info.ss +++ b/collects/algol60/info.ss @@ -1,4 +1,5 @@ (module info (lib "infotab.ss" "setup") (define name "Algol 60") (define doc.txt "doc.txt") - (define tools (list (list "tool.ss")))) + (define tools '(("tool.ss"))) + (define tool-names '("Algol 60"))) diff --git a/collects/drscheme/private/app.ss b/collects/drscheme/private/app.ss index c6e1ed30ed..58d5af5485 100644 --- a/collects/drscheme/private/app.ss +++ b/collects/drscheme/private/app.ss @@ -259,54 +259,52 @@ (insert-url/external-browser "PLT" "http://www.plt-scheme.org/") (send* e - (insert ".") - (insert #\newline) + (insert ".\n") (insert (get-authors)) - (insert #\newline) - (insert "For licensing information see ")) + (insert "\nFor licensing information see ")) - (insert/clickback "our software license" (λ () (help-desk:goto-plt-license))) + (insert/clickback "our software license" + (λ () (help-desk:goto-plt-license))) (send* e - (insert ".") - (insert #\newline) - (insert #\newline) - (insert "Based on:") - (insert #\newline) - (insert " ") + (insert ".\n\nBased on:\n ") (insert (banner))) (when (or (eq? (system-type) 'macos) (eq? (system-type) 'macosx)) (send* e - (insert " The A List (c) 1997-2001 Kyle Hammond") - (insert #\newline))) - - (let ([tools (drscheme:tools:get-successful-tools)]) + (insert " The A List (c) 1997-2001 Kyle Hammond\n"))) + + (let ([tools (sort (drscheme:tools:get-successful-tools) + (lambda (a b) + (stringstring (drscheme:tools:successful-tool-spec a)) + (path->string (drscheme:tools:successful-tool-spec b)))))]) (unless (null? tools) - (send* e - (insert #\newline) - (insert "Installed tools:") - (insert #\newline)) - (for-each - (λ (successful-tool) - (let ([name (or (drscheme:tools:successful-tool-name successful-tool) - (format "~s" (drscheme:tools:successful-tool-spec successful-tool)))] - [bm (drscheme:tools:successful-tool-bitmap successful-tool)] - [url (drscheme:tools:successful-tool-url successful-tool)]) - (send e insert " ") - (when bm - (send* e - (insert (make-object image-snip% bm)) - (insert #\space))) - (cond - [url - (insert-url/external-browser name url)] - [else - (send e insert name)]) - (send e insert #\newline))) - tools))) - + (let loop ([actions1 '()] [actions2 '()] [tools tools]) + (if (pair? tools) + (let* ([successful-tool (car tools)] + [name (drscheme:tools:successful-tool-name successful-tool)] + [spec (drscheme:tools:successful-tool-spec successful-tool)] + [bm (drscheme:tools:successful-tool-bitmap successful-tool)] + [url (drscheme:tools:successful-tool-url successful-tool)]) + (define (action) + (send e insert " ") + (when bm + (send* e + (insert (make-object image-snip% bm)) + (insert #\space))) + (let ([name (or name (format "~a" spec))]) + (cond [url (insert-url/external-browser name url)] + [else (send e insert name)])) + (send e insert #\newline)) + (if name + (loop (cons action actions1) actions2 (cdr tools)) + (loop actions1 (cons action actions2) (cdr tools)))) + (begin (send e insert "\nInstalled tools:\n") + (for-each (λ (act) (act)) (reverse! actions1)) + ;; (send e insert "Installed anonymous tools:\n") + (for-each (λ (act) (act)) (reverse! actions2))))))) + (send e insert "\n") (send e insert (get-translating-acks)) diff --git a/collects/guibuilder/info.ss b/collects/guibuilder/info.ss index 96c788cbd7..1431551492 100644 --- a/collects/guibuilder/info.ss +++ b/collects/guibuilder/info.ss @@ -1,5 +1,5 @@ - (module info (lib "infotab.ss" "setup") (define doc.txt "doc.txt") (define name "GUI Builder") - (define tools (list (list "tool.ss")))) + (define tools '(("tool.ss"))) + (define tool-names '("GUI Builder"))) diff --git a/collects/profj/info.ss b/collects/profj/info.ss index 282beae893..d14ad5c14c 100644 --- a/collects/profj/info.ss +++ b/collects/profj/info.ss @@ -1,15 +1,16 @@ (module info (lib "infotab.ss" "setup") (require (lib "string-constant.ss" "string-constants")) - (define name "ProfessorJ") (define doc.txt "doc.txt") - (define tools (list (list "tool.ss"))) + (define tools '(("tool.ss"))) + (define tool-names '("ProfessorJ")) (define install-collection "installer.ss") (define pre-install-collection "pre-installer.ss") - (define compile-subcollections (list (list "profj" "parsers") - (list "profj" "libs" "java" "lang") - (list "profj" "libs" "java" "io") - (list "profj" "libs" "java" "util"))) + (define compile-subcollections + '(("profj" "parsers") + ("profj" "libs" "java" "lang") + ("profj" "libs" "java" "io") + ("profj" "libs" "java" "util"))) (define textbook-pls (list (list '("htdch-icon.png" "profj") "How to Design Class Hierarchies" diff --git a/collects/profjWizard/info.ss b/collects/profjWizard/info.ss index b45003b357..1d981a16c9 100644 --- a/collects/profjWizard/info.ss +++ b/collects/profjWizard/info.ss @@ -1,13 +1,14 @@ (module info (lib "infotab.ss" "setup") (define name "ProfessorJ Wizard") - (define tools (list (list "tool.ss"))) - (define comment '(define compile-subcollections (list (list "profj" "parsers") - (list "profj" "libs" "java" "lang") - (list "profj" "libs" "java" "io")))) + (define tools '(("tool.ss"))) + (define tool-names '("ProfessorJ Wizard")) + ;; (define compile-subcollections + ;; '(("profj" "parsers") + ;; ("profj" "libs" "java" "lang") + ;; ("profj" "libs" "java" "io"))) (define compile-omit-files '("draw-txt0.ss" "macro-class.scm" "view0.scm" "data-defs0.scm")) - ) diff --git a/collects/xml/info.ss b/collects/xml/info.ss index 1585179812..6b89602de4 100644 --- a/collects/xml/info.ss +++ b/collects/xml/info.ss @@ -1,4 +1,3 @@ - (module info (lib "infotab.ss" "setup") (define name "XML") (define doc.txt "doc.txt") @@ -7,8 +6,5 @@ (define help-desk-message "Mz/Mr: (require (lib \"xml.ss\" \"xml\"))") (define blurb `("The XML collection provides functions for reading, writing, and manipulating XML documents.")) - (define tools (list "text-box-tool.ss")) - (define tool-name (list "Text Box"))) - - - + (define tools '(("text-box-tool.ss"))) + (define tool-names '("Text Box")))