OS X: disable reordering of tabs in the new tab-panel%
widget
Fixes racket/drracket#52
(cherry picked from commit f0d10e9cc8
)
This commit is contained in:
parent
c94fa35bc5
commit
c843108e8d
|
@ -68,7 +68,8 @@
|
||||||
(queue-window*-event wxb (lambda (wx) (send wx do-callback)))))))
|
(queue-window*-event wxb (lambda (wx) (send wx do-callback)))))))
|
||||||
|
|
||||||
;; The MMTabBarView widget doesn't support disabling, so we have to
|
;; The MMTabBarView widget doesn't support disabling, so we have to
|
||||||
;; implement it:
|
;; implement it. Also, we need to override a method to disable (for now)
|
||||||
|
;; reordering tabs.
|
||||||
(define-objc-mixin (EnableMixin Superclass)
|
(define-objc-mixin (EnableMixin Superclass)
|
||||||
[wxb]
|
[wxb]
|
||||||
(-a _id (hitTest: [_NSPoint pt])
|
(-a _id (hitTest: [_NSPoint pt])
|
||||||
|
@ -76,7 +77,9 @@
|
||||||
(if (and wx
|
(if (and wx
|
||||||
(not (send wx is-enabled-to-root?)))
|
(not (send wx is-enabled-to-root?)))
|
||||||
#f
|
#f
|
||||||
(super-tell hitTest: #:type _NSPoint pt)))))
|
(super-tell hitTest: #:type _NSPoint pt))))
|
||||||
|
(-a _BOOL (shouldStartDraggingAttachedTabBarButton: b withMouseDownEvent: evt)
|
||||||
|
#f))
|
||||||
|
|
||||||
;; A no-op mixin instead of `EnableMixin` for PSMTabBarControl:
|
;; A no-op mixin instead of `EnableMixin` for PSMTabBarControl:
|
||||||
(define-objc-mixin (EmptyMixin Superclass)
|
(define-objc-mixin (EmptyMixin Superclass)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user