git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] gitk window icons
@ 2009-03-19  8:54 Stephen Boyd
  2009-03-19  8:54 ` [PATCH 1/2] gitk: try to provide a window icon Stephen Boyd
  2009-03-23 10:59 ` [PATCH 0/2] gitk window icons Paul Mackerras
  0 siblings, 2 replies; 4+ messages in thread
From: Stephen Boyd @ 2009-03-19  8:54 UTC (permalink / raw)
  To: Paul Mackerras; +Cc: git, Giuseppe Bilotta

These two patches set the git logo, three red minus signs and three green plus
signs below on a white background, as the window icon for gitk.

I found this first patch by Giuseppe posted to the mailing list a couple months
ago. I've simply added a 32x32 icon in the second patch so that window managers
can provide a slightly better looking icon when they need a bigger icon
(ALT-TAB for example).

This logo is different than the logo used by git-gui. Do we want to use that
logo instead?

Giuseppe Bilotta (1):
  gitk: try to provide a window icon

Stephen Boyd (1):
  gitk: provide a 32x32 window icon based on the git logo

 gitk |   23 +++++++++++++++++++++++
 1 files changed, 23 insertions(+), 0 deletions(-)

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/2] gitk: try to provide a window icon
  2009-03-19  8:54 [PATCH 0/2] gitk window icons Stephen Boyd
@ 2009-03-19  8:54 ` Stephen Boyd
  2009-03-19  8:54   ` [PATCH 2/2] gitk: provide a 32x32 window icon based on the git logo Stephen Boyd
  2009-03-23 10:59 ` [PATCH 0/2] gitk window icons Paul Mackerras
  1 sibling, 1 reply; 4+ messages in thread
From: Stephen Boyd @ 2009-03-19  8:54 UTC (permalink / raw)
  To: Paul Mackerras; +Cc: git, Giuseppe Bilotta

From: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>

Try to set up a 16x16 Tk photo image (based on the git logo) and use it
as window icon. Wrap the code 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>
---
 gitk |   20 ++++++++++++++++++++
 1 files changed, 20 insertions(+), 0 deletions(-)

diff --git a/gitk b/gitk
index 1773ae6..cfbb699 100755
--- a/gitk
+++ b/gitk
@@ -10883,6 +10883,26 @@ set lserial 0
 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]]"
-- 
1.6.2

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] gitk: provide a 32x32 window icon based on the git logo
  2009-03-19  8:54 ` [PATCH 1/2] gitk: try to provide a window icon Stephen Boyd
@ 2009-03-19  8:54   ` Stephen Boyd
  0 siblings, 0 replies; 4+ messages in thread
From: Stephen Boyd @ 2009-03-19  8:54 UTC (permalink / raw)
  To: Paul Mackerras; +Cc: git, Giuseppe Bilotta

Signed-off-by: Stephen Boyd <bebarino@gmail.com>
---
 gitk |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/gitk b/gitk
index cfbb699..5a09eca 100755
--- a/gitk
+++ b/gitk
@@ -10901,7 +10901,10 @@ catch {
 	gitlogo copy gitlogoplus  -to 11 9
 	image delete gitlogoplus
 
-	wm iconphoto . -default gitlogo
+	image create photo gitlogo32    -width 32 -height 32
+	gitlogo32 copy gitlogo -zoom 2 2
+
+	wm iconphoto . -default gitlogo gitlogo32
 }
 # wait for the window to become visible
 tkwait visibility .
-- 
1.6.2

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 0/2] gitk window icons
  2009-03-19  8:54 [PATCH 0/2] gitk window icons Stephen Boyd
  2009-03-19  8:54 ` [PATCH 1/2] gitk: try to provide a window icon Stephen Boyd
@ 2009-03-23 10:59 ` Paul Mackerras
  1 sibling, 0 replies; 4+ messages in thread
From: Paul Mackerras @ 2009-03-23 10:59 UTC (permalink / raw)
  To: Stephen Boyd; +Cc: git, Giuseppe Bilotta

Stephen Boyd writes:

> These two patches set the git logo, three red minus signs and three green plus
> signs below on a white background, as the window icon for gitk.

Thanks, applied.  (I adjusted the indentation in both and wrote a
brief commit message for the second.)

Paul.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-03-23 11:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-19  8:54 [PATCH 0/2] gitk window icons Stephen Boyd
2009-03-19  8:54 ` [PATCH 1/2] gitk: try to provide a window icon Stephen Boyd
2009-03-19  8:54   ` [PATCH 2/2] gitk: provide a 32x32 window icon based on the git logo Stephen Boyd
2009-03-23 10:59 ` [PATCH 0/2] gitk window icons Paul Mackerras

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).