git-gui: update shortcut tools to use _gitworktree
Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Giuseppe Bilotta committed
Jan 23, 2010 at 11:03 UTC
3748b03d92c3dcefcc65739f73ae0a1382a7da20
1 file changed
+4
-3
lib/shortcut.tcl
+4
-3
@@ -2,6 +2,7 @@
2
# Copyright (C) 2006, 2007 Shawn Pearce
3
4
proc do_windows_shortcut {} {
5
+ global _gitworktree
6
set fn [tk_getSaveFile \
7
-parent . \
8
-title [append "[appname] ([reponame]): " [mc "Create Desktop Icon"]] \
@@ -15,7 +16,7 @@ proc do_windows_shortcut {} {
16
[info nameofexecutable] \
17
[file normalize $::argv0] \
18
] \
18
- [file dirname [file normalize [gitdir]]]
19
+ [file normalize [$_gitworktree]]
20
} err]} {
21
error_popup [strcat [mc "Cannot write shortcut:"] "\n\n$err"]
22
}
@@ -23,7 +24,7 @@ proc do_windows_shortcut {} {
24
}
25
26
proc do_cygwin_shortcut {} {
26
- global argv0
27
+ global argv0 _gitworktree
28
29
if {[catch {
30
set desktop [exec cygpath \
@@ -56,7 +57,7 @@ proc do_cygwin_shortcut {} {
57
$sh -c \
58
"CHERE_INVOKING=1 source /etc/profile;[sq $me] &" \
59
] \
59
- [file dirname [file normalize [gitdir]]]
60
+ [file normalize [$_gitworktree]]
61
} err]} {
62
error_popup [strcat [mc "Cannot write shortcut:"] "\n\n$err"]
63
}