diff options
author | Ibrahim Mkusa <ibrahimmkusa@gmail.com> | 2017-04-23 04:04:45 -0400 |
---|---|---|
committer | Ibrahim Mkusa <ibrahimmkusa@gmail.com> | 2017-04-23 04:04:45 -0400 |
commit | 6b85be6490763110514702ba5587f0e3ffbc4510 (patch) | |
tree | 1538f8d72af4b8cbeecfd2b01f26ca9a85a8f88c | |
parent | ed5d1d7571ce0359aa52c4bb4b401b3a1b220c7c (diff) |
bug fix: no longer attaches username to every received message.
-rw-r--r-- | Hermes/GUI.rkt | 10 | ||||
-rw-r--r-- | Hermes/client.rkt | 1 |
2 files changed, 7 insertions, 4 deletions
diff --git a/Hermes/GUI.rkt b/Hermes/GUI.rkt index a1d69a6..491557e 100644 --- a/Hermes/GUI.rkt +++ b/Hermes/GUI.rkt @@ -130,7 +130,9 @@ (define color (substring user-input (+ 2 (string-length username) (string-length input)))) (send dc set-text-foreground color) ; set dc's text color to user ; provided - (send dc draw-text (string-append username ":" input) 0 height) + ; (send dc draw-text (string-append username ":" input) 0 height) + (send dc draw-text input 0 height) ;; just print message to string + (set! listy (appendlist listy (list username input color height))) (set! height (+ height 15)) ; redraw overly long text on gui @@ -149,10 +151,10 @@ ;; draws messages to the screen canvas as text (define (re-draw-message username input color in-height) - (begin (send dc set-text-foreground color) - (send dc draw-text (string-append username ":" input) 0 in-height) - )) + ; (send dc draw-text (string-append username ":" input) 0 in-height) + (send dc draw-text input 0 in-height) + ) ; used when redrawing the screen along with its helper. (define (update given-list) diff --git a/Hermes/client.rkt b/Hermes/client.rkt index 38ed60d..b2ca903 100644 --- a/Hermes/client.rkt +++ b/Hermes/client.rkt @@ -101,6 +101,7 @@ (flush-output out) (close-output-port error-out) (close-output-port convs-out) + ;(custodian-shutdown-all main-client-cust) (exit))) (displayln (string-append date-print username ": " input) out) |