From 4f929a71719c59ac6f48a4ea3c8226e4866f9864 Mon Sep 17 00:00:00 2001 From: Danny Yoo Date: Wed, 2 May 2012 23:18:54 -0400 Subject: [PATCH] adding helper message labels --- whalesong-gui.rkt | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/whalesong-gui.rkt b/whalesong-gui.rkt index 69ee7a8..e450584 100644 --- a/whalesong-gui.rkt +++ b/whalesong-gui.rkt @@ -41,11 +41,18 @@ (cond [source-path - (current-output-dir (path-only source-path)) + (current-output-dir + (build-path (path-only source-path) + (let-values ([(_1 name _2) + (split-path source-path)]) + (regexp-replace #px"\\.\\w+$" (path->string name) "")))) (send source-path-message set-label (gui-utils:quote-literal-label - (format "~s selected. Output will be written to ~s." - (path->string source-path) + (format "~s selected." + (path->string source-path)))) + (send dest-dir-message set-label + (gui-utils:quote-literal-label + (format "Output will be written to ~s." (path->string (current-output-dir))))) (send build-button enable #t)] [else @@ -55,6 +62,9 @@ (define source-path-message (new message% [parent dialog] [label NO-FILE-SELECTED] [auto-resize #t])) + (define dest-dir-message (new message% [parent dialog] + [label ""] + [auto-resize #t]))