]> git.ipfire.org Git - thirdparty/git.git/commitdiff
git-gui--askyesno (mingw): use Git for Windows' icon, if available
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Thu, 28 Aug 2025 08:58:50 +0000 (08:58 +0000)
committerJohannes Sixt <j6t@kdbg.org>
Thu, 28 Aug 2025 20:54:20 +0000 (22:54 +0200)
This provides a unified look-and-feel in Git for Windows.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Johannes Sixt <j6t@kdbg.org>
git-gui--askyesno

index d0c801c42c7c9441bbf7e25184015f6ba1297b7c..142d1bc3de229bcdb4473cb6fb3bac20c1445b9e 100755 (executable)
@@ -47,5 +47,17 @@ pack .b -side bottom -fill x -ipadx 20 -ipady 15
 bind . <Key-Return> {exit 0}
 bind . <Key-Escape> {exit 1}
 
+if {$::tcl_platform(platform) eq {windows}} {
+       set icopath [file dirname [file normalize $argv0]]
+       if {[file tail $icopath] eq {git-core}} {
+               set icopath [file dirname $icopath]
+       }
+       set icopath [file dirname $icopath]
+       set icopath [file join $icopath share git git-for-windows.ico]
+       if {[file exists $icopath]} {
+               wm iconbitmap . -default $icopath
+       }
+}
+
 wm title . $title
 tk::PlaceWindow .