From 5059db47d3cd2b42820c12b6cd493da3913b7536 Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Sat, 28 Dec 2013 20:48:52 -0600 Subject: [PATCH] adjust the installation package GUI so it doesn't install during and installation (ditto update) closes PR 14263 this may be a release branch candidate. I'm not sure myself, but the PR sounds worrying. If it should be considered, then this is the relevant diff (since more than half of the diff is whitespace changes) to the file pkg/gui/main: @@ -57,6 +57,8 @@ (define terminal #f) (define (in-terminal-panel abort-label thunk) + (cond + [(or (not terminal) (send terminal can-close?)) (send dlg begin-container-sequence) (when terminal (send terminal close)) (define t (in-terminal @@ -71,7 +73,10 @@ (disallow-close) (send dlg end-container-sequence) (yield (send t can-close-evt)) - (allow-close)) + (allow-close)] + [else + (message-box (string-constant install-pkg-dialog-title) + (string-constant install-pkg-not-rentrant))])) --- .../gui-pkg-manager-lib/pkg/gui/main.rkt | 35 +++++++++++-------- .../private/english-string-constants.rkt | 3 ++ 2 files changed, 23 insertions(+), 15 deletions(-) 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