Skip to content

Commit d1f2b36

Browse files
Oblomovspearce
authored andcommitted
git-gui: try to provide a window icon under X
When running under X, we try to set up a window icon by providing a hand-crafted 16x16 Tk photo image equivalent to the .ico. Wrap in a catch because the earlier Tcl/Tk 8.4 releases didn't provide the 'wm iconphoto' command. Signed-off-by: Giuseppe Bilotta <[email protected]> Signed-off-by: Shawn O. Pearce <[email protected]>
1 parent f75c8b3 commit d1f2b36

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

git-gui.sh

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -597,6 +597,28 @@ if {[is_Windows]} {
597597
if {![info exists env(DISPLAY)]} {
598598
set env(DISPLAY) :9999
599599
}
600+
} else {
601+
catch {
602+
image create photo gitlogo -width 16 -height 16
603+
604+
gitlogo put #33CC33 -to 7 0 9 2
605+
gitlogo put #33CC33 -to 4 2 12 4
606+
gitlogo put #33CC33 -to 7 4 9 6
607+
gitlogo put #CC3333 -to 4 6 12 8
608+
gitlogo put gray26 -to 4 9 6 10
609+
gitlogo put gray26 -to 3 10 6 12
610+
gitlogo put gray26 -to 8 9 13 11
611+
gitlogo put gray26 -to 8 11 10 12
612+
gitlogo put gray26 -to 11 11 13 14
613+
gitlogo put gray26 -to 3 12 5 14
614+
gitlogo put gray26 -to 5 13
615+
gitlogo put gray26 -to 10 13
616+
gitlogo put gray26 -to 4 14 12 15
617+
gitlogo put gray26 -to 5 15 11 16
618+
gitlogo redither
619+
620+
wm iconphoto . -default gitlogo
621+
}
600622
}
601623
602624
######################################################################

0 commit comments

Comments
 (0)