svn: r6369

original commit: e9385a910eac5c2f84dccbe6d66fed0741200785
This commit is contained in:
Matthew Flatt 2007-05-29 03:26:32 +00:00
parent e53c838f2c
commit f44ee89359
4 changed files with 9 additions and 18 deletions

View File

@ -92,7 +92,8 @@
(sequence
(let ([cwho '(constructor canvas)])
(check-container-parent cwho parent)
(check-style cwho #f '(border hscroll vscroll gl deleted control-border combo no-autoclear transparent resize-corner)
(check-style cwho #f '(border hscroll vscroll gl deleted control-border combo no-autoclear
transparent resize-corner no-focus)
style)
(check-callback cwho paint-callback)
(check-label-string/false cwho label)))

View File

@ -249,7 +249,6 @@
;; build-input-port : string -> (values input any)
;; constructs an input port for the load handler. Also
;; returns a value representing the source of code read from the file.
;; if the file's first lines begins with #!, skips the first chars of the file.
(define (build-input-port filename)
(let ([p (open-input-file filename)])
(port-count-lines! p)
@ -261,21 +260,6 @@
(open-input-text-editor t))]
[else p])])
(port-count-lines! p) ; in case it's new
(let loop ()
;; Wrap regexp check with `with-handlers' in case the file
;; starts with non-text input
(when (with-handlers ([exn:fail? (lambda (x) #f)])
(regexp-match-peek #rx"^#!" p))
;; Throw away chars/specials up to eol,
;; and continue if line ends in backslash
(let lloop ([prev #f])
(let ([c (read-char-or-special p)])
(if (or (eof-object? c)
(eq? c #\return)
(eq? c #\newline))
(when (eq? prev #\\)
(loop))
(lloop c))))))
(values p filename))))
(define (open-input-graphical-file filename)

View File

@ -156,7 +156,7 @@
(when (and (> w 5) (> h 5))
(draw-button-label dc label 0 0 w h mouse-over? mouse-grabbed? font))]))))
(super-new [style '(transparent)])
(super-new [style '(transparent no-focus)])
(update-min-sizes)
(stretchable-width #f)
(stretchable-height #f)))

View File

@ -1,3 +1,9 @@
Version 370.2
Added 'no-focus style for canvas%
----------------------------------------------------------------------
Version 370, May 2007
WXME file format changed to include a #reader() prefix