summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 681c329)
raw | patch | inline | side by side (parent: 681c329)
author | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | |
Thu, 19 Mar 2009 08:54:17 +0000 (01:54 -0700) | ||
committer | Paul Mackerras <paulus@samba.org> | |
Mon, 23 Mar 2009 10:52:59 +0000 (21:52 +1100) |
Try to set up a 16x16 Tk photo image (based on the git logo) and use
it as window icon. The code is wrapped in a catch because it may fail
in earlier Tcl/Tk 8.4 releases that don't provide 'wm iconphoto'.
Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
Signed-off-by: Stephen Boyd <bebarino@gmail.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
it as window icon. The code is wrapped in a catch because it may fail
in earlier Tcl/Tk 8.4 releases that don't provide 'wm iconphoto'.
Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
Signed-off-by: Stephen Boyd <bebarino@gmail.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
gitk | patch | blob | history |
index d7de27e75d014926eebe97d88a7b423606247bb1..82bc2af7611b5a3e67611028e8ff904c394d4cac 100755 (executable)
--- a/gitk
+++ b/gitk
set isworktree [expr {[exec git rev-parse --is-inside-work-tree] == "true"}]
setcoords
makewindow
+catch {
+ image create photo gitlogo -width 16 -height 16
+
+ image create photo gitlogominus -width 4 -height 2
+ gitlogominus put #C00000 -to 0 0 4 2
+ gitlogo copy gitlogominus -to 1 5
+ gitlogo copy gitlogominus -to 6 5
+ gitlogo copy gitlogominus -to 11 5
+ image delete gitlogominus
+
+ image create photo gitlogoplus -width 4 -height 4
+ gitlogoplus put #008000 -to 1 0 3 4
+ gitlogoplus put #008000 -to 0 1 4 3
+ gitlogo copy gitlogoplus -to 1 9
+ gitlogo copy gitlogoplus -to 6 9
+ gitlogo copy gitlogoplus -to 11 9
+ image delete gitlogoplus
+
+ wm iconphoto . -default gitlogo
+}
# wait for the window to become visible
tkwait visibility .
wm title . "[file tail $argv0]: [file tail [pwd]]"