{"thread":{"id":"16896","subject":"[PATCH] gitk: try to provide a window icon","startedAt":"2008-12-28T11:28:04Z","lastAt":"2008-12-28T11:28:04Z","messageCount":1,"participants":["Giuseppe Bilotta"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"98835","messageId":"1230463684-26412-1-git-send-email-giuseppe.bilotta@gmail.com","threadId":"16896","inReplyTo":null,"subject":"[PATCH] gitk: try to provide a window icon","fromName":"Giuseppe Bilotta","fromEmail":"giuseppe.bilotta@gmail.com","sentAt":"2008-12-28T11:28:04Z","receivedAt":"2008-12-28T11:28:04Z","isPatch":true,"sender":{"key":"giuseppe.bilotta@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1464?v=4"},"body":"Try to set up a 16x16 Tk photo image (based on the git logo) and use it\nas window icon. Wrap the code in a catch because it may fail in earlier\nTcl/Tk 8.4 releases that don't provide 'wm iconphoto'.\n\nSigned-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>\n---\n\nResend (with a typo fixed in the commit message), because it seems to\nhave flied a little too low on the previous round of commits.\n\n gitk-git/gitk |   20 ++++++++++++++++++++\n 1 files changed, 20 insertions(+), 0 deletions(-)\n\ndiff --git a/gitk-git/gitk b/gitk-git/gitk\nindex dc2a439..8c6a50d 100644\n--- a/gitk-git/gitk\n+++ b/gitk-git/gitk\n@@ -10881,6 +10881,26 @@ set lserial 0\n set isworktree [expr {[exec git rev-parse --is-inside-work-tree] == \"true\"}]\n setcoords\n makewindow\n+catch {\n+\timage create photo gitlogo      -width 16 -height 16\n+\n+\timage create photo gitlogominus -width  4 -height  2\n+\tgitlogominus put #C00000 -to 0 0 4 2\n+\tgitlogo copy gitlogominus -to  1 5\n+\tgitlogo copy gitlogominus -to  6 5\n+\tgitlogo copy gitlogominus -to 11 5\n+\timage delete gitlogominus\n+\n+\timage create photo gitlogoplus  -width  4 -height  4\n+\tgitlogoplus  put #008000 -to 1 0 3 4\n+\tgitlogoplus  put #008000 -to 0 1 4 3\n+\tgitlogo copy gitlogoplus  -to  1 9\n+\tgitlogo copy gitlogoplus  -to  6 9\n+\tgitlogo copy gitlogoplus  -to 11 9\n+\timage delete gitlogoplus\n+\n+\twm iconphoto . -default gitlogo\n+}\n # wait for the window to become visible\n tkwait visibility .\n wm title . \"[file tail $argv0]: [file tail [pwd]]\"\n-- \n1.5.6.5\n"}]}