Mercurial > hg
diff contrib/hgk @ 5392:66d7aabf5b41
hgk: fix right-mouse button handling under macosx
author | Patrick Mezard <pmezard@gmail.com> |
---|---|
date | Tue, 02 Oct 2007 23:28:02 +0200 |
parents | f8c36b215281 |
children | c2ad1890fc53 |
line wrap: on
line diff
--- a/contrib/hgk Fri Oct 05 23:01:38 2007 +0200 +++ b/contrib/hgk Tue Oct 02 23:28:02 2007 +0200 @@ -73,6 +73,15 @@ } +# Unify right mouse button handling. +# See "mouse buttons on macintosh" thread on comp.lang.tcl +if {[tk windowingsystem] eq "aqua"} { + event add <<B3>> <Control-ButtonPress-1> + event add <<B3>> <Button-2> +} else { + event add <<B3>> <Button-3> +} + proc gitdir {} { global env if {[info exists env(GIT_DIR)]} { @@ -937,7 +946,7 @@ set date [lindex $commitinfo($id) 2] set linehtag($lineno) [$canv create text $xt $y1 -anchor w \ -text $headline -font $mainfont ] - $canv bind $linehtag($lineno) <Button-3> "rowmenu %X %Y $id" + $canv bind $linehtag($lineno) <<B3>> "rowmenu %X %Y $id" set linentag($lineno) [$canv2 create text 3 $y1 -anchor w \ -text $name -font $namefont] set linedtag($lineno) [$canv3 create text 3 $y1 -anchor w \