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

Commit 0543774

Browse files
sschuberthkasal
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 d87a841 commit 0543774

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
@@ -12093,7 +12093,6 @@ if { [info exists ::env(GITK_MSGSDIR)] } {
1209312093
set gitk_prefix [file dirname [file dirname [file normalize $argv0]]]
1209412094
set gitk_libdir [file join $gitk_prefix share gitk lib]
1209512095
set gitk_msgsdir [file join $gitk_libdir msgs]
12096-
unset gitk_prefix
1209712096
}
1209812097

1209912098
## Internationalization (i18n) through msgcat and gettext. See
@@ -12272,28 +12271,32 @@ if {[expr {[exec git rev-parse --is-inside-work-tree] == "true"}]} {
1227212271
set worktree [exec git rev-parse --show-toplevel]
1227312272
setcoords
1227412273
makewindow
12275-
catch {
12276-
image create photo gitlogo -width 16 -height 16
12277-
12278-
image create photo gitlogominus -width 4 -height 2
12279-
gitlogominus put #C00000 -to 0 0 4 2
12280-
gitlogo copy gitlogominus -to 1 5
12281-
gitlogo copy gitlogominus -to 6 5
12282-
gitlogo copy gitlogominus -to 11 5
12283-
image delete gitlogominus
12284-
12285-
image create photo gitlogoplus -width 4 -height 4
12286-
gitlogoplus put #008000 -to 1 0 3 4
12287-
gitlogoplus put #008000 -to 0 1 4 3
12288-
gitlogo copy gitlogoplus -to 1 9
12289-
gitlogo copy gitlogoplus -to 6 9
12290-
gitlogo copy gitlogoplus -to 11 9
12291-
image delete gitlogoplus
12292-
12293-
image create photo gitlogo32 -width 32 -height 32
12294-
gitlogo32 copy gitlogo -zoom 2 2
12295-
12296-
wm iconphoto . -default gitlogo gitlogo32
12274+
if {$::tcl_platform(platform) eq {windows} && [file exists $gitk_prefix/etc/git.ico]} {
12275+
wm iconbitmap . -default $gitk_prefix/etc/git.ico
12276+
} else {
12277+
catch {
12278+
image create photo gitlogo -width 16 -height 16
12279+
12280+
image create photo gitlogominus -width 4 -height 2
12281+
gitlogominus put #C00000 -to 0 0 4 2
12282+
gitlogo copy gitlogominus -to 1 5
12283+
gitlogo copy gitlogominus -to 6 5
12284+
gitlogo copy gitlogominus -to 11 5
12285+
image delete gitlogominus
12286+
12287+
image create photo gitlogoplus -width 4 -height 4
12288+
gitlogoplus put #008000 -to 1 0 3 4
12289+
gitlogoplus put #008000 -to 0 1 4 3
12290+
gitlogo copy gitlogoplus -to 1 9
12291+
gitlogo copy gitlogoplus -to 6 9
12292+
gitlogo copy gitlogoplus -to 11 9
12293+
image delete gitlogoplus
12294+
12295+
image create photo gitlogo32 -width 32 -height 32
12296+
gitlogo32 copy gitlogo -zoom 2 2
12297+
12298+
wm iconphoto . -default gitlogo gitlogo32
12299+
}
1229712300
}
1229812301
# wait for the window to become visible
1229912302
tkwait visibility .

0 commit comments

Comments
 (0)