git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] git-gui: try to provide a window icon under X

From
Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
Date
Nov 16, 2008, 02:09 UTC
Message-ID
<1226801378-25501-1-git-send-email-giuseppe.bilotta@gmail.com>
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.
---
 git-gui/git-gui.sh |   22 ++++++++++++++++++++++
 1 files changed, 22 insertions(+), 0 deletions(-)
diff --git a/git-gui/git-gui.sh b/git-gui/git-gui.sh
index cf9ef6e..6ed6230 100755
--- a/git-gui/git-gui.sh
+++ b/git-gui/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
+	}
 }
 
 ######################################################################
-- 
1.5.6.5
Next: Giuseppe Bilotta
Message 1 of 2 in “git-gui: try to provide a window icon under X”
  1. git-gui: try to provide a window icon under XGiuseppe Bilotta, Nov 16, 2008
  2. git-gui: try to provide a window icon under XGiuseppe Bilotta, Nov 16, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.