Re: [Gitk PATCH 1/6] gitk: Add procedure to create accelerated menus

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Robin Rosenberg writes:

> +proc mcw {menubar args} {
> +    set ai [lsearch $args "-label"]
> +    if { $ai > 0 } {
> +	set label [lindex $args [expr {$ai + 1}]]
> +	foreach {l u} [::tk::UnderlineAmpersand $label] {

Where did you find out about ::tk::UnderlineAmpersand?  Is it part of
the exported interface of Tk that we can rely on in future?

> +# Wrapper for mc to remove ampersands used for accelerators.
> +proc mca {label} {
> +    set tl8 [mc $label]
> +    foreach {l u} [::tk::UnderlineAmpersand $tl8] break
> +    return $l

	return [string map {"&" ""} [mc $label]]

instead, perhaps?

Paul.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux