Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions gui-lib/mred/private/wxme/editor-canvas.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -350,12 +350,12 @@

(define-syntax-rule (using-admin body ...)
(let ([oldadmin (send media get-admin)])
(unless (eq? admin oldadmin)
(unless (object-or-false=? admin oldadmin)
(send media set-admin admin))
(begin0
(begin body ...)
(when media
(unless (eq? admin oldadmin)
(unless (object-or-false=? admin oldadmin)
;; FIXME: how do we know that this adminstrator
;; still wants the editor?
(send media set-admin oldadmin))))))
Expand Down Expand Up @@ -1104,7 +1104,7 @@
(define/public (get-editor) media)

(define/public (set-editor m [update? #t])
(unless (eq? media m)
(unless (object-or-false=? media m)
(when media
(when (object/bool=? admin (send media get-admin))
(send media set-admin
Expand Down
4 changes: 2 additions & 2 deletions gui-lib/mred/private/wxme/editor-snip.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@

(def/override (set-admin [(make-or-false snip-admin%) a])

(when (not (eq? a s-admin))
(unless (object-or-false=? a s-admin)
(super set-admin a)
(when editor
(if a
Expand All @@ -125,7 +125,7 @@
(void))

(def/public (set-editor [editor<%> b])
(unless (eq? editor b)
(unless (object-or-false=? editor b)
(when (and editor s-admin)
(send editor set-admin #f))
(set! editor b)
Expand Down
12 changes: 6 additions & 6 deletions gui-lib/mred/private/wxme/editor.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@
#t)

(def/public (do-set-caret-owner [(make-or-false snip%) snip] [symbol? dist])
(let ([same? (eq? snip s-caret-snip)])
(let ([same? (object-or-false=? snip s-caret-snip)])
(if (and same?
(or (not s-admin) (eq? dist 'immediate)))
#f
Expand Down Expand Up @@ -610,7 +610,7 @@
[new-list (read-styles-from-file s-style-list f overwritestylename? list-id)])
(and new-list
(begin
(unless (eq? new-list s-style-list)
(unless (object=? new-list s-style-list)
(set-style-list new-list))
(let-boxes ([num-headers 0])
(send f get-fixed num-headers)
Expand Down Expand Up @@ -1232,7 +1232,7 @@
(define/public (do-own-x-selection on? force?)
(if on?
(if (and (not force?)
(not (eq? editor-x-selection-allowed this)))
(not (object-or-false=? editor-x-selection-allowed this)))
#f
(begin
(when editor-x-selection-owner
Expand All @@ -1243,7 +1243,7 @@
(set! editor-x-selection-owner this)
#t))
(begin
(when (eq? this editor-x-selection-owner)
(when (object-or-false=? this editor-x-selection-owner)
(set! editor-x-selection-owner #f)
(when (and (not x-selection-copied?)
(send the-x-selection-clipboard same-clipboard-client?
Expand All @@ -1252,7 +1252,7 @@
#t)))

(define/public (copy-out-x-selection)
(when (eq? this editor-x-selection-owner)
(when (object-or-false=? this editor-x-selection-owner)
(copy-into-selection)
(set! x-selection-copied? #t)))

Expand Down Expand Up @@ -1472,7 +1472,7 @@
(reverse snip-list)
(let loop ([snip start-snip])
(if (and snip
(not (eq? snip end-snip)))
(not (object-or-false=? snip end-snip)))
(cons snip (loop (snip->next snip)))
null)))])

Expand Down
4 changes: 2 additions & 2 deletions gui-lib/mred/private/wxme/keymap.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -760,12 +760,12 @@

(define/public (cycle-check km)
(ormap (lambda (c)
(or (eq? km c)
(or (object=? km c)
(send c cycle-check km)))
chain-to))

(def/public (chain-to-keymap [keymap% km] [any? prefix?])
(unless (or (eq? km this)
(unless (or (object=? km this)
(cycle-check km)
(send km cycle-check this))
(set! chain-to (if prefix?
Expand Down
14 changes: 7 additions & 7 deletions gui-lib/mred/private/wxme/standard-snip-admin.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -65,28 +65,28 @@
[nonnegative-real? w] [nonnegative-real? h]
[any? [refresh? #t]]
[(symbol-in start end none) [bias 'none]])
(and (eq? (send s get-admin) this)
(and (object-or-false=? (send s get-admin) this)
(send editor scroll-to s localx localy w h refresh? bias)))

(def/override (set-caret-owner [snip% s] [(symbol-in imeditorte display global) dist])
(when (eq? (send s get-admin) this)
(when (object-or-false=? (send s get-admin) this)
(send editor set-caret-owner s dist)))

(def/override (resized [snip% s] [any? redraw?])
(when (eq? (send s get-admin) this)
(when (object-or-false=? (send s get-admin) this)
(send editor resized s redraw?)))

(def/override (recounted [snip% s] [any? redraw?])
(when (eq? (send s get-admin) this)
(when (object-or-false=? (send s get-admin) this)
(send editor recounted s redraw?)))

(def/override (needs-update [snip% s] [real? localx] [real? localy]
[nonnegative-real? w] [nonnegative-real? h])
(when (eq? (send s get-admin) this)
(when (object-or-false=? (send s get-admin) this)
(send editor needs-update s localx localy w h)))

(def/override (release-snip [snip% s])
(and (eq? (send s get-admin) this)
(and (object-or-false=? (send s get-admin) this)
(send editor release-snip s)))

(def/override (update-cursor)
Expand All @@ -105,7 +105,7 @@
(send admin popup-menu m (+ x sl) (+ y st)))))))

(def/override (modified [snip% s] [any? modified?])
(when (eq? (send s get-admin) this)
(when (object-or-false=? (send s get-admin) this)
(send editor on-snip-modified s modified?)))

(def/override (get-line-spacing)
Expand Down
10 changes: 5 additions & 5 deletions gui-lib/mred/private/wxme/stream.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@

(define/public (do-reading-version sclass)
(or (ormap (lambda (scl)
(and (eq? (snip-class-link-c scl) sclass)
(and (object-or-false=? (snip-class-link-c scl) sclass)
(snip-class-link-reading-version scl)))
sl)
;; Class didn't show up in the header?
Expand All @@ -60,26 +60,26 @@
(define/public (do-map-position sclass-or-dclass)
(if (sclass-or-dclass . is-a? . snip-class%)
(or (ormap (lambda (scl)
(and (eq? (snip-class-link-c scl) sclass-or-dclass)
(and (object=? (snip-class-link-c scl) sclass-or-dclass)
(snip-class-link-map-position scl)))
sl)
-1)
(or (ormap (lambda (dcl)
(and (eq? (editor-data-class-link-c dcl) sclass-or-dclass)
(and (object=? (editor-data-class-link-c dcl) sclass-or-dclass)
(editor-data-class-link-map-position dcl)))
dl)
-1)))

(define/public (do-get-header-flag sclass)
(or (ormap (lambda (scl)
(and (eq? (snip-class-link-c scl) sclass)
(and (object=? (snip-class-link-c scl) sclass)
(snip-class-link-header-flag scl)))
sl)
0))

(define/public (do-set-header-flag sclass)
(ormap (lambda (scl)
(and (eq? (snip-class-link-c scl) sclass)
(and (object=? (snip-class-link-c scl) sclass)
(begin
(set-snip-class-link-header-flag! scl #t)
#t)))
Expand Down
Loading
Loading