cocoa: fix "&" handling in menu-item labels
Closes PR 12025
This commit is contained in:
parent
d8352d5890
commit
de54efc84e
|
@ -61,7 +61,7 @@
|
||||||
(send submenu install menu label enabled?)
|
(send submenu install menu label enabled?)
|
||||||
(let ([item (as-objc-allocation
|
(let ([item (as-objc-allocation
|
||||||
(tell (tell MyMenuItem alloc)
|
(tell (tell MyMenuItem alloc)
|
||||||
initWithTitle: #:type _NSString (regexp-replace #rx"\t.*" label "")
|
initWithTitle: #:type _NSString (clean-menu-label (regexp-replace #rx"\t.*" label ""))
|
||||||
action: #:type _SEL #f
|
action: #:type _SEL #f
|
||||||
keyEquivalent: #:type _NSString ""))])
|
keyEquivalent: #:type _NSString ""))])
|
||||||
(set-ivar! item wxb (->wxb this))
|
(set-ivar! item wxb (->wxb this))
|
||||||
|
|
|
@ -266,6 +266,10 @@
|
||||||
"[on-demand hook]"
|
"[on-demand hook]"
|
||||||
m
|
m
|
||||||
void)
|
void)
|
||||||
|
(make-object menu-item%
|
||||||
|
"6 && Half-D&ozen"
|
||||||
|
m
|
||||||
|
void)
|
||||||
(let mloop ([m m][sub-at-50? #t])
|
(let mloop ([m m][sub-at-50? #t])
|
||||||
(let ([sm (if (and sub-at-50?
|
(let ([sm (if (and sub-at-50?
|
||||||
(send e button-down? 'middle))
|
(send e button-down? 'middle))
|
||||||
|
@ -750,7 +754,8 @@
|
||||||
tab grp)]
|
tab grp)]
|
||||||
[canvas (make-object popup-test-canvas%
|
[canvas (make-object popup-test-canvas%
|
||||||
items
|
items
|
||||||
(list "h slider" "v slider"
|
(list "combo"
|
||||||
|
"h slider" "v slider"
|
||||||
"v gauge" "v gauge"
|
"v gauge" "v gauge"
|
||||||
; "text msg" "image msg"
|
; "text msg" "image msg"
|
||||||
"text"
|
"text"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user