Re: [PATCH (GITK) v3 3/6] gitk: Add accelerators to frequently used menu commands.

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

 



Alexander Gavrilov writes:

> -	eval $m add $params [lrange $i 4 end]
> +	set tail [lrange $i 4 end]
> +	regsub -all {\$M1T\y} $tail $M1T tail
> +	eval $m add $params $tail

This is solving the problem that the $M1T doesn't get expanded in the
call below because it's inside {}.  If we are going to have a magic
string that gets expanded like this, I'd rather it didn't look like a
variable reference, because that is confusing.

Alternatively, we could define a [meta] function that does this:

proc meta {x} {
    if {[tk windowingsystem] eq "aqua"} {
	return Cmd-$x
    }
    return Ctrl-$x
}

and then use -accelerator [meta F5] in the makemenu call, and not have
any magic string substitution in makemenu.  That will work since the
eval will evaluate the [].

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