Merge branch 'bw/push-options-recursively-to-submodules' into maint
[gitweb.git] / git-gui / lib / shortcut.tcl
index 78878ef89d11210d614fc8b3d2957705611bdaa3..97d1d7aa02686606912dd5ff7b512343083a17c0 100644 (file)
@@ -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 != {}} {