From: Robin Rosenberg <robin.rosenberg.lists@dewire.com>
To: Paul Mackerras <paulus@samba.org>
Cc: git@vger.kernel.org
Subject: Re: [Gitk PATCH 1/6] gitk: Add procedure to create accelerated menus
Date: Sat, 11 Oct 2008 13:39:23 +0200 [thread overview]
Message-ID: <200810111339.23343.robin.rosenberg.lists@dewire.com> (raw)
In-Reply-To: <18672.1017.68669.913415@cargo.ozlabs.ibm.com>
lördagen den 11 oktober 2008 03.40.09 skrev Paul Mackerras:
> 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?
I found it here. http://wiki.tcl.tk/1632. It hints that it may not be unoffical. Seems to
original from: http://groups.google.com/group/comp.lang.perl.tk/browse_thread/thread/5b6f4c6a4a9f17b4/c9f8ab47800d27ee?lnk=st&q=#c9f8ab47800d27ee
so if someone thinks there is a problem we could replace it with UnderlineAmpersand
with tcl code to do the same (or rip it as is if the license allows it).
>
> > +# 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?
In theory we should translate && to & also, which UnderLineAmpersand does.
-- robin
next prev parent reply other threads:[~2008-10-11 11:42 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-09 6:09 [Gitk Patch 0/6] Robin Rosenberg
2008-10-09 6:09 ` [Gitk PATCH 1/6] gitk: Add procedure to create accelerated menus Robin Rosenberg
2008-10-09 6:09 ` [Gitk PATCH 2/6] gitk: Change menus to use accelerated design Robin Rosenberg
2008-10-09 6:09 ` [Gitk PATCH 3/6] gitk: regenerated po files Robin Rosenberg
2008-10-09 6:09 ` [Gitk PATCH 4/6] gitk: Add accelerator hints Robin Rosenberg
2008-10-09 6:09 ` [Gitk PATCH 5/6] gitk: regenerated po files Robin Rosenberg
2008-10-09 6:09 ` [Gitk PATCH 6/6] gitk: Add menu accelerators for Swedish translation Robin Rosenberg
2008-10-11 1:40 ` [Gitk PATCH 1/6] gitk: Add procedure to create accelerated menus Paul Mackerras
2008-10-11 11:39 ` Robin Rosenberg [this message]
2008-10-11 2:44 ` [Gitk Patch 0/6] Paul Mackerras
2008-10-11 11:14 ` Robin Rosenberg
2008-10-18 12:11 ` Paul Mackerras
2008-10-19 21:19 ` [GITK PATCH] Add menu accelerators Robin Rosenberg
2008-10-19 22:00 ` [GITK PATCH v2] " Robin Rosenberg
2008-10-20 23:21 ` Paul Mackerras
-- strict thread matches above, loose matches on Subject: below --
2008-10-07 21:56 [Gitk PATCH 0/6] Menu accelerators for Gitk Robin Rosenberg
2008-10-07 21:56 ` [Gitk PATCH 1/6] gitk: Add procedure to create accelerated menus Robin Rosenberg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200810111339.23343.robin.rosenberg.lists@dewire.com \
--to=robin.rosenberg.lists@dewire.com \
--cc=git@vger.kernel.org \
--cc=paulus@samba.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).