From: Giuseppe Bilotta Date: Sun, 16 Nov 2008 02:42:32 +0000 (+0100) Subject: git-gui: try to provide a window icon under X X-Git-Tag: v1.6.1-rc1~3^2~12 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=d1f2b362b7937c1ecb0d1b9a21d76b362705b87d;p=git.git 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 Signed-off-by: Shawn O. Pearce --- diff --git a/git-gui.sh b/git-gui.sh index cf9ef6ee0..6ed6230d3 100755 --- a/git-gui.sh +++ b/git-gui.sh @@ -597,6 +597,28 @@ if {[is_Windows]} { if {![info exists env(DISPLAY)]} { set env(DISPLAY) :9999 } +} else { + catch { + image create photo gitlogo -width 16 -height 16 + + gitlogo put #33CC33 -to 7 0 9 2 + gitlogo put #33CC33 -to 4 2 12 4 + gitlogo put #33CC33 -to 7 4 9 6 + gitlogo put #CC3333 -to 4 6 12 8 + gitlogo put gray26 -to 4 9 6 10 + gitlogo put gray26 -to 3 10 6 12 + gitlogo put gray26 -to 8 9 13 11 + gitlogo put gray26 -to 8 11 10 12 + gitlogo put gray26 -to 11 11 13 14 + gitlogo put gray26 -to 3 12 5 14 + gitlogo put gray26 -to 5 13 + gitlogo put gray26 -to 10 13 + gitlogo put gray26 -to 4 14 12 15 + gitlogo put gray26 -to 5 15 11 16 + gitlogo redither + + wm iconphoto . -default gitlogo + } } ######################################################################