Skip to content
This repository was archived by the owner on Nov 9, 2017. It is now read-only.

Commit a325ef9

Browse files
sschuberthkblees
authored andcommitted
gitk: Use an external icon file on Windows
Git for Windows now ships with the new Git icon from git-scm.com. Use that icon file if it exists instead of the old procedurally drawn one. This patch was sent upstream but so far no decision on its inclusion was made, so commit it to our fork. Signed-off-by: Sebastian Schuberth <[email protected]>
1 parent ffa28b4 commit a325ef9

File tree

1 file changed

+26
-23
lines changed

1 file changed

+26
-23
lines changed

gitk-git/gitk

Lines changed: 26 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -12151,7 +12151,6 @@ if { [info exists ::env(GITK_MSGSDIR)] } {
1215112151
set gitk_prefix [file dirname [file dirname [file normalize $argv0]]]
1215212152
set gitk_libdir [file join $gitk_prefix share gitk lib]
1215312153
set gitk_msgsdir [file join $gitk_libdir msgs]
12154-
unset gitk_prefix
1215512154
}
1215612155

1215712156
## Internationalization (i18n) through msgcat and gettext. See
@@ -12330,28 +12329,32 @@ if {[expr {[exec git rev-parse --is-inside-work-tree] == "true"}]} {
1233012329
set worktree [exec git rev-parse --show-toplevel]
1233112330
setcoords
1233212331
makewindow
12333-
catch {
12334-
image create photo gitlogo -width 16 -height 16
12335-
12336-
image create photo gitlogominus -width 4 -height 2
12337-
gitlogominus put #C00000 -to 0 0 4 2
12338-
gitlogo copy gitlogominus -to 1 5
12339-
gitlogo copy gitlogominus -to 6 5
12340-
gitlogo copy gitlogominus -to 11 5
12341-
image delete gitlogominus
12342-
12343-
image create photo gitlogoplus -width 4 -height 4
12344-
gitlogoplus put #008000 -to 1 0 3 4
12345-
gitlogoplus put #008000 -to 0 1 4 3
12346-
gitlogo copy gitlogoplus -to 1 9
12347-
gitlogo copy gitlogoplus -to 6 9
12348-
gitlogo copy gitlogoplus -to 11 9
12349-
image delete gitlogoplus
12350-
12351-
image create photo gitlogo32 -width 32 -height 32
12352-
gitlogo32 copy gitlogo -zoom 2 2
12353-
12354-
wm iconphoto . -default gitlogo gitlogo32
12332+
if {$::tcl_platform(platform) eq {windows} && [file exists $gitk_prefix/etc/git.ico]} {
12333+
wm iconbitmap . -default $gitk_prefix/etc/git.ico
12334+
} else {
12335+
catch {
12336+
image create photo gitlogo -width 16 -height 16
12337+
12338+
image create photo gitlogominus -width 4 -height 2
12339+
gitlogominus put #C00000 -to 0 0 4 2
12340+
gitlogo copy gitlogominus -to 1 5
12341+
gitlogo copy gitlogominus -to 6 5
12342+
gitlogo copy gitlogominus -to 11 5
12343+
image delete gitlogominus
12344+
12345+
image create photo gitlogoplus -width 4 -height 4
12346+
gitlogoplus put #008000 -to 1 0 3 4
12347+
gitlogoplus put #008000 -to 0 1 4 3
12348+
gitlogo copy gitlogoplus -to 1 9
12349+
gitlogo copy gitlogoplus -to 6 9
12350+
gitlogo copy gitlogoplus -to 11 9
12351+
image delete gitlogoplus
12352+
12353+
image create photo gitlogo32 -width 32 -height 32
12354+
gitlogo32 copy gitlogo -zoom 2 2
12355+
12356+
wm iconphoto . -default gitlogo gitlogo32
12357+
}
1235512358
}
1235612359
# wait for the window to become visible
1235712360
tkwait visibility .

0 commit comments

Comments
 (0)