From cd039c024019888c112ad9e7f44b7549c9138c0c Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Fri, 3 Mar 2006 22:23:48 +0000 Subject: [PATCH] fixed a problem John talked about and made the find dialog be non-sheet svn: r2362 --- collects/framework/framework.ss | 2 +- collects/framework/private/frame.ss | 23 +++++++++++++++-------- collects/framework/private/group.ss | 4 ++-- collects/framework/private/handler.ss | 2 +- 4 files changed, 19 insertions(+), 12 deletions(-) diff --git a/collects/framework/framework.ss b/collects/framework/framework.ss index a04db310eb..0cf23f8f19 100644 --- a/collects/framework/framework.ss +++ b/collects/framework/framework.ss @@ -843,7 +843,7 @@ "Adds a filename to the list of recently opened files.") (handler:set-recent-position - (string? number? number? . -> . void?) + (path? number? number? . -> . void?) (filename start end) "Sets the selection of the recently opened file to" "\\var{start} and \\var{end}.") diff --git a/collects/framework/private/frame.ss b/collects/framework/private/frame.ss index 56640f9b80..31998fcb5f 100644 --- a/collects/framework/private/frame.ss +++ b/collects/framework/private/frame.ss @@ -1220,7 +1220,10 @@ (define/private (cancel-due-to-unsaved-changes editor) (and (send editor is-modified?) (let ([save (gui-utils:unsaved-warning - (or (send editor get-filename) (get-label)) + (let ([fn (send editor get-filename)]) + (if fn + (path->string fn) + (get-label))) (string-constant clear-anyway) #t this)]) @@ -1283,8 +1286,11 @@ (define/private (user-okays-switch? ed) (or (not (send ed is-modified?)) (let ([answer - (gui-utils:unsaved-warning - (or (send ed get-filename) (get-label)) + (gui-utils:unsaved-warning + (let ([fn (send ed get-filename)]) + (if fn + (path->string fn) + (get-label))) (string-constant switch-anyway) #t)]) (case answer @@ -1569,11 +1575,12 @@ [allow-replace? (not (send to-be-searched-text is-locked?))] - [dialog (make-object dialog% - (if allow-replace? - (string-constant find-and-replace) - (string-constant find)) - frame)] + [dialog (new dialog% + (label (if allow-replace? + (string-constant find-and-replace) + (string-constant find))) + (parent frame) + (style '(no-sheet)))] [copy-text (λ (from to) diff --git a/collects/framework/private/group.ss b/collects/framework/private/group.ss index 826173d9fd..fd96a4ea7f 100644 --- a/collects/framework/private/group.ss +++ b/collects/framework/private/group.ss @@ -288,7 +288,7 @@ (send t begin-edit-sequence) (send t erase) (when full-name - (send t insert full-name)) + (send t insert (path->string full-name))) (send t end-edit-sequence))] [(list-box-dclick) (set! cancelled? #f) @@ -307,7 +307,7 @@ (let ([fr (car sorted-frames)]) (when (and (is-a? fr frame:basic<%>) (send fr get-filename)) - (send t insert (send (car sorted-frames) get-filename))) + (send t insert (path->string (send (car sorted-frames) get-filename)))) (send lb set-selection 0)) (send d show #t) (unless cancelled? diff --git a/collects/framework/private/handler.ss b/collects/framework/private/handler.ss index fe5c3e870e..4b7657a260 100644 --- a/collects/framework/private/handler.ss +++ b/collects/framework/private/handler.ss @@ -198,7 +198,7 @@ (size-down (preferences:get 'framework:recently-opened-files/pos) n))) - ;; set-recent-position : string number number -> void + ;; set-recent-position : path number number -> void ;; updates the recent menu preferences ;; with the positions `start' and `end' (define (set-recent-position filename start end)