diff --git a/pkgs/drracket-pkgs/drracket/pkg/gui/by-installed.rkt b/pkgs/drracket-pkgs/drracket/pkg/gui/by-installed.rkt index 4ebbb5f751..cbe8204501 100644 --- a/pkgs/drracket-pkgs/drracket/pkg/gui/by-installed.rkt +++ b/pkgs/drracket-pkgs/drracket/pkg/gui/by-installed.rkt @@ -12,10 +12,16 @@ (struct ipkg (name scope auto? checksum source)) (define (scopebytes a) (path->bytes b)))] + [(path? b) #f] + [else + (case a + [(installation) #t] + [(user) (eq? b 'shared)] + [else #f])])) (define (ipkgvector l)) (send pkg-list set (for/list ([i (in-list l)]) - (~a (if (ipkg-auto? i) "*" "") - (ipkg-scope i))) + (if (ipkg-auto? i) "*" "")) + (for/list ([i (in-list l)]) + (~a (ipkg-scope i))) (for/list ([i (in-list l)]) (format "~a" (ipkg-name i))) (for/list ([i (in-list l)]) @@ -164,6 +173,7 @@ [(catalog) "Catalog"] [(url) "URL"] [(link) "Link"] + [(static-link) "Static link"] [(file) "File"]) (cadr s)))) (adjust-buttons!)))) diff --git a/pkgs/drracket-pkgs/drracket/pkg/gui/by-list.rkt b/pkgs/drracket-pkgs/drracket/pkg/gui/by-list.rkt index ccabb5a126..41e624b9ab 100644 --- a/pkgs/drracket-pkgs/drracket/pkg/gui/by-list.rkt +++ b/pkgs/drracket-pkgs/drracket/pkg/gui/by-list.rkt @@ -266,7 +266,7 @@ (string-constant install-pkg-update-catalogs) (string-constant install-pkg-do-not-update-catalogs) #f - this + (get-top-level-window) '(caution default=1))) (db:set-catalogs! user-catalogs) (update-db-package-list)))) @@ -416,7 +416,7 @@ (define/private (refresh-installed-list! #:always? [always? #f]) (define new-installed - (for*/hash ([scope (in-list '(installation user shared))] + (for*/hash ([scope (in-list (get-scope-list))] [(k v) (in-hash (installed-pkg-table #:scope scope))]) (values k (cons scope v)))) (when (or always? @@ -459,7 +459,7 @@ [(pkg-info-auto? info) "*"] [else check-mark]) (cond - [(eq? (car v) default-scope) ""] + [(equal? (car v) default-scope) ""] [else "!"]) (case (car (pkg-info-orig-pkg info)) [(catalog) ""] diff --git a/pkgs/drracket-pkgs/drracket/pkg/gui/common.rkt b/pkgs/drracket-pkgs/drracket/pkg/gui/common.rkt index d8f94c667a..ca5cce6cde 100644 --- a/pkgs/drracket-pkgs/drracket/pkg/gui/common.rkt +++ b/pkgs/drracket-pkgs/drracket/pkg/gui/common.rkt @@ -2,11 +2,13 @@ (require racket/class racket/gui/base string-constants - racket/format) + racket/format + setup/dirs) (provide really-remove? sc-install-pkg-remove - pick-wider) + pick-wider + get-scope-list) (define sc-install-pkg-remove (string-constant install-pkg-remove)) (define really-uninstall?-msg (string-constant install-pkg-really-remove?)) @@ -30,3 +32,12 @@ (if (wa . > . wb) a b)) + +(define (get-scope-list) + (append (let ([main (find-pkgs-dir)]) + (reverse + (for/list ([d (get-pkgs-search-dirs)]) + (if (equal? d main) + 'installation + d)))) + '(user shared))) diff --git a/pkgs/drracket-pkgs/drracket/pkg/gui/main.rkt b/pkgs/drracket-pkgs/drracket/pkg/gui/main.rkt index 2183f42107..a93fea895a 100644 --- a/pkgs/drracket-pkgs/drracket/pkg/gui/main.rkt +++ b/pkgs/drracket-pkgs/drracket/pkg/gui/main.rkt @@ -160,4 +160,4 @@ frame) (module+ main - (void (make-pkg-installer))) + (void (make-pkg-gui)))