diff options
Diffstat (limited to 'git-gui/lib/shortcut.tcl')
-rw-r--r-- | git-gui/lib/shortcut.tcl | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/git-gui/lib/shortcut.tcl b/git-gui/lib/shortcut.tcl index 78878ef89d..97d1d7aa02 100644 --- a/git-gui/lib/shortcut.tcl +++ b/git-gui/lib/shortcut.tcl @@ -5,17 +5,20 @@ proc do_windows_shortcut {} { global _gitworktree set fn [tk_getSaveFile \ -parent . \ - -title [append "[appname] ([reponame]): " [mc "Create Desktop Icon"]] \ + -title [mc "%s (%s): Create Desktop Icon" [appname] [reponame]] \ -initialfile "Git [reponame].lnk"] if {$fn != {}} { if {[file extension $fn] ne {.lnk}} { set fn ${fn}.lnk } + # Use git-gui.exe if available (ie: git-for-windows) + set cmdLine [auto_execok git-gui.exe] + if {$cmdLine eq {}} { + set cmdLine [list [info nameofexecutable] \ + [file normalize $::argv0]] + } if {[catch { - win32_create_lnk $fn [list \ - [info nameofexecutable] \ - [file normalize $::argv0] \ - ] \ + win32_create_lnk $fn $cmdLine \ [file normalize $_gitworktree] } err]} { error_popup [strcat [mc "Cannot write shortcut:"] "\n\n$err"] @@ -37,7 +40,7 @@ proc do_cygwin_shortcut {} { } set fn [tk_getSaveFile \ -parent . \ - -title [append "[appname] ([reponame]): " [mc "Create Desktop Icon"]] \ + -title [mc "%s (%s): Create Desktop Icon" [appname] [reponame]] \ -initialdir $desktop \ -initialfile "Git [reponame].lnk"] if {$fn != {}} { @@ -69,7 +72,7 @@ proc do_macosx_app {} { set fn [tk_getSaveFile \ -parent . \ - -title [append "[appname] ([reponame]): " [mc "Create Desktop Icon"]] \ + -title [mc "%s (%s): Create Desktop Icon" [appname] [reponame]] \ -initialdir [file join $env(HOME) Desktop] \ -initialfile "Git [reponame].app"] if {$fn != {}} { |