diff --git a/pkgs/gui-pkg-manager-pkgs/gui-pkg-manager-lib/pkg/gui/main.rkt b/pkgs/gui-pkg-manager-pkgs/gui-pkg-manager-lib/pkg/gui/main.rkt index 05239313e0..b9240f260a 100644 --- a/pkgs/gui-pkg-manager-pkgs/gui-pkg-manager-lib/pkg/gui/main.rkt +++ b/pkgs/gui-pkg-manager-pkgs/gui-pkg-manager-lib/pkg/gui/main.rkt @@ -57,21 +57,26 @@ (define terminal #f) (define (in-terminal-panel abort-label thunk) - (send dlg begin-container-sequence) - (when terminal (send terminal close)) - (define t (in-terminal - #:abort-label abort-label - #:canvas-min-height 200 - #:container dlg - #:close-button? #f - (λ (cust parent) (wrap-terminal-action thunk)))) - (move-close-button (send t get-button-panel)) - (send dlg reflow-container) - (set! terminal t) - (disallow-close) - (send dlg end-container-sequence) - (yield (send t can-close-evt)) - (allow-close)) + (cond + [(or (not terminal) (send terminal can-close?)) + (send dlg begin-container-sequence) + (when terminal (send terminal close)) + (define t (in-terminal + #:abort-label abort-label + #:canvas-min-height 200 + #:container dlg + #:close-button? #f + (λ (cust parent) (wrap-terminal-action thunk)))) + (move-close-button (send t get-button-panel)) + (send dlg reflow-container) + (set! terminal t) + (disallow-close) + (send dlg end-container-sequence) + (yield (send t can-close-evt)) + (allow-close)] + [else + (message-box (string-constant install-pkg-dialog-title) + (string-constant install-pkg-not-rentrant))])) (define (disallow-close) (set! allow-close? #f) diff --git a/pkgs/string-constants-pkgs/string-constants-lib/string-constants/private/english-string-constants.rkt b/pkgs/string-constants-pkgs/string-constants-lib/string-constants/private/english-string-constants.rkt index 1bb7db98ce..58ad57a64a 100644 --- a/pkgs/string-constants-pkgs/string-constants-lib/string-constants/private/english-string-constants.rkt +++ b/pkgs/string-constants-pkgs/string-constants-lib/string-constants/private/english-string-constants.rkt @@ -1889,6 +1889,9 @@ please adhere to these guidelines: (install-pkg-package-catalogs "Package Catalogs") ; label for a list box (install-pkg-add-package-catalog "Add Package Catalog") + (install-pkg-not-rentrant "Installation and updating cannot happen simultaneously;" + " either abort the current one or wait for it to finish.") + ;; open a file via a collection path (new "Open" menu item in DrRacket) (open-collection-path "Open Collection Path...") (enter-subcollection "Enter subcollection") ; button in new dialog