gtk: fix drag-and-drop URI decoding

Closes PR 11695
 Merge to 5.1
(cherry picked from commit 2d01241f7a)
This commit is contained in:
Matthew Flatt 2011-02-02 06:32:51 -07:00 committed by Eli Barzilay
parent 2e67a39ae8
commit 3b47d8eb35

View File

@ -1,6 +1,7 @@
#lang racket/base #lang racket/base
(require ffi/unsafe (require ffi/unsafe
racket/class racket/class
net/uri-codec
ffi/unsafe/atomic ffi/unsafe/atomic
"../../syntax.rkt" "../../syntax.rkt"
"../../lock.rkt" "../../lock.rkt"
@ -121,7 +122,10 @@
=> (lambda (m) => (lambda (m)
(queue-window-event wx (queue-window-event wx
(lambda () (lambda ()
(let ([path (bytes->path (cadr m))]) (let ([path
(string->path
(uri-decode
(bytes->string/utf-8 (cadr m))))])
(send wx on-drop-file path)))))])))))) (send wx on-drop-file path)))))]))))))
;; ---------------------------------------- ;; ----------------------------------------