From ae35be36d89a293611d9586e32e0f72f5195834f Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Tue, 20 Aug 2013 17:17:57 -0600 Subject: [PATCH] minor adjustment to the GUI package manager Avoid using some GUI elements in the wrong thread, just in case. --- .../gui-pkg-manager-lib/pkg/gui/by-source.rkt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/gui-pkg-manager-pkgs/gui-pkg-manager-lib/pkg/gui/by-source.rkt b/pkgs/gui-pkg-manager-pkgs/gui-pkg-manager-lib/pkg/gui/by-source.rkt index 98cf5431e2..42f9cff98c 100644 --- a/pkgs/gui-pkg-manager-pkgs/gui-pkg-manager-lib/pkg/gui/by-source.rkt +++ b/pkgs/gui-pkg-manager-pkgs/gui-pkg-manager-lib/pkg/gui/by-source.rkt @@ -146,14 +146,14 @@ [style '(border)] [callback (lambda (b e) (define res (compute-cmd-line)) + (define action (case (cmdline-which res) + [(install) pkg-install-command] + [(update) pkg-update-command])) (in-terminal (case (cmdline-which res) [(install) (string-constant install-pkg-abort-install)] [(update) (string-constant install-pkg-abort-update)]) (lambda () - (define action (case (cmdline-which res) - [(install) pkg-install-command] - [(update) pkg-update-command])) (keyword-apply action (cmdline-kwds res) (cmdline-kwd-args res) @@ -267,10 +267,10 @@ [parent scope-panel] [callback (lambda (b e) + (define scope (selected-scope)) (in-terminal sc-install-pkg-abort-set-scope (lambda () - (define scope (selected-scope)) (pkg-config-command #:scope 'user #:set #t "default-scope"