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 <giuseppe.bilotta@gmail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Giuseppe Bilotta committed
Nov 16, 2008 at 03:42 UTC
d1f2b362b7937c1ecb0d1b9a21d76b362705b87d
1 file changed
+22
git-gui.sh
+22
@@ -597,6 +597,28 @@ if {[is_Windows]} {
597
if {![info exists env(DISPLAY)]} {
598
set env(DISPLAY) :9999
599
}
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
+ }
622
}
623
624
######################################################################