@@ -2076,7 +2076,7 @@ proc makewindow {} {
2076
2076
global headctxmenu progresscanv progressitem progresscoords statusw
2077
2077
global fprogitem fprogcoord lastprogupdate progupdatepending
2078
2078
global rprogitem rprogcoord rownumsel numcommits
2079
- global have_tk85 use_ttk NS
2079
+ global have_tk85 have_tk86 use_ttk NS
2080
2080
global git_version
2081
2081
global worddiff
2082
2082
@@ -2566,8 +2566,13 @@ proc makewindow {} {
2566
2566
bind . <Key-Down> " selnextline 1"
2567
2567
bind . <Shift-Key-Up> " dofind -1 0"
2568
2568
bind . <Shift-Key-Down> " dofind 1 0"
2569
- bindkey <Key-Right> " goforw"
2570
- bindkey <Key-Left> " goback"
2569
+ if {$have_tk86 } {
2570
+ bindkey <<NextChar>> " goforw"
2571
+ bindkey <<PrevChar>> " goback"
2572
+ } else {
2573
+ bindkey <Key-Right> " goforw"
2574
+ bindkey <Key-Left> " goback"
2575
+ }
2571
2576
bind . <Key-Prior> " selnextpage -1"
2572
2577
bind . <Key-Next> " selnextpage 1"
2573
2578
bind . <$M1B -Home> " allcanvs yview moveto 0.0"
@@ -7634,7 +7639,7 @@ proc gettreeline {gtf id} {
7634
7639
if {[string index $fname 0] eq " \" " } {
7635
7640
set fname [lindex $fname 0]
7636
7641
}
7637
- set fname [encoding convertfrom $fname ]
7642
+ set fname [encoding convertfrom utf-8 $fname ]
7638
7643
lappend treefilelist($id ) $fname
7639
7644
}
7640
7645
if {![eof $gtf ]} {
@@ -7896,7 +7901,7 @@ proc gettreediffline {gdtf ids} {
7896
7901
if {[string index $file 0] eq " \" " } {
7897
7902
set file [lindex $file 0]
7898
7903
}
7899
- set file [encoding convertfrom $file ]
7904
+ set file [encoding convertfrom utf-8 $file ]
7900
7905
if {$file ne [lindex $treediff end]} {
7901
7906
lappend treediff $file
7902
7907
lappend sublist $file
@@ -8041,7 +8046,7 @@ proc makediffhdr {fname ids} {
8041
8046
global ctext curdiffstart treediffs diffencoding
8042
8047
global ctext_file_names jump_to_here targetline diffline
8043
8048
8044
- set fname [encoding convertfrom $fname ]
8049
+ set fname [encoding convertfrom utf-8 $fname ]
8045
8050
set diffencoding [get_path_encoding $fname ]
8046
8051
set i [lsearch -exact $treediffs($ids) $fname ]
8047
8052
if {$i >= 0} {
@@ -8103,7 +8108,7 @@ proc parseblobdiffline {ids line} {
8103
8108
8104
8109
if {![string compare -length 5 " diff " $line ]} {
8105
8110
if {![regexp {^diff (--cc|--git) } $line m type]} {
8106
- set line [encoding convertfrom $line ]
8111
+ set line [encoding convertfrom utf-8 $line ]
8107
8112
$ctext insert end " $line \n " hunksep
8108
8113
continue
8109
8114
}
@@ -8150,7 +8155,7 @@ proc parseblobdiffline {ids line} {
8150
8155
makediffhdr $fname $ids
8151
8156
8152
8157
} elseif {![string compare -length 16 " * Unmerged path " $line ]} {
8153
- set fname [encoding convertfrom [string range $line 16 end]]
8158
+ set fname [encoding convertfrom utf-8 [string range $line 16 end]]
8154
8159
$ctext insert end " \n "
8155
8160
set curdiffstart [$ctext index " end - 1c" ]
8156
8161
lappend ctext_file_names $fname
@@ -8205,7 +8210,7 @@ proc parseblobdiffline {ids line} {
8205
8210
if {[string index $fname 0] eq " \" " } {
8206
8211
set fname [lindex $fname 0]
8207
8212
}
8208
- set fname [encoding convertfrom $fname ]
8213
+ set fname [encoding convertfrom utf-8 $fname ]
8209
8214
set i [lsearch -exact $treediffs($ids) $fname ]
8210
8215
if {$i >= 0} {
8211
8216
setinlist difffilestart $i $curdiffstart
@@ -8224,6 +8229,7 @@ proc parseblobdiffline {ids line} {
8224
8229
set diffinhdr 0
8225
8230
return
8226
8231
}
8232
+ set line [encoding convertfrom utf-8 $line ]
8227
8233
$ctext insert end " $line \n " filesep
8228
8234
8229
8235
} else {
@@ -9982,7 +9988,7 @@ proc showrefs {} {
9982
9988
text $top .list -background $bgcolor -foreground $fgcolor \
9983
9989
-selectbackground $selectbgcolor -font mainfont \
9984
9990
-xscrollcommand " $top .xsb set" -yscrollcommand " $top .ysb set" \
9985
- -width 30 -height 20 -cursor $maincursor \
9991
+ -width 60 -height 20 -cursor $maincursor \
9986
9992
-spacing1 1 -spacing3 1 -state disabled
9987
9993
$top .list tag configure highlight -background $selectbgcolor
9988
9994
if {![lsearch -exact $bglist $top .list]} {
@@ -12161,7 +12167,7 @@ proc cache_gitattr {attr pathlist} {
12161
12167
foreach row [split $rlist " \n " ] {
12162
12168
if {[regexp "(.*): $attr : (.*)" $row m path value]} {
12163
12169
if {[string index $path 0] eq " \" " } {
12164
- set path [encoding convertfrom [lindex $path 0]]
12170
+ set path [encoding convertfrom utf-8 [lindex $path 0]]
12165
12171
}
12166
12172
set path_attr_cache($attr ,$path ) $value
12167
12173
}
@@ -12191,7 +12197,6 @@ if { [info exists ::env(GITK_MSGSDIR)] } {
12191
12197
set gitk_prefix [file dirname [file dirname [file normalize $argv0 ]]]
12192
12198
set gitk_libdir [file join $gitk_prefix share gitk lib]
12193
12199
set gitk_msgsdir [file join $gitk_libdir msgs]
12194
- unset gitk_prefix
12195
12200
}
12196
12201
12197
12202
# # Internationalization (i18n) through msgcat and gettext. See
@@ -12482,6 +12487,7 @@ set nullid2 "0000000000000000000000000000000000000001"
12482
12487
set nullfile " /dev/null"
12483
12488
12484
12489
set have_tk85 [expr {[package vcompare $tk_version " 8.5" ] >= 0}]
12490
+ set have_tk86 [expr {[package vcompare $tk_version " 8.6" ] >= 0}]
12485
12491
if {![info exists have_ttk]} {
12486
12492
set have_ttk [llength [info commands ::ttk::style]]
12487
12493
}
@@ -12546,28 +12552,32 @@ if {[expr {[exec git rev-parse --is-inside-work-tree] == "true"}]} {
12546
12552
set worktree [exec git rev-parse --show-toplevel]
12547
12553
setcoords
12548
12554
makewindow
12549
- catch {
12550
- image create photo gitlogo -width 16 -height 16
12551
-
12552
- image create photo gitlogominus -width 4 -height 2
12553
- gitlogominus put #C00000 -to 0 0 4 2
12554
- gitlogo copy gitlogominus -to 1 5
12555
- gitlogo copy gitlogominus -to 6 5
12556
- gitlogo copy gitlogominus -to 11 5
12557
- image delete gitlogominus
12558
-
12559
- image create photo gitlogoplus -width 4 -height 4
12560
- gitlogoplus put #008000 -to 1 0 3 4
12561
- gitlogoplus put #008000 -to 0 1 4 3
12562
- gitlogo copy gitlogoplus -to 1 9
12563
- gitlogo copy gitlogoplus -to 6 9
12564
- gitlogo copy gitlogoplus -to 11 9
12565
- image delete gitlogoplus
12566
-
12567
- image create photo gitlogo32 -width 32 -height 32
12568
- gitlogo32 copy gitlogo -zoom 2 2
12569
-
12570
- wm iconphoto . -default gitlogo gitlogo32
12555
+ if {$::tcl_platform(platform) eq {windows} && [file exists $gitk_prefix /etc/git.ico]} {
12556
+ wm iconbitmap . -default $gitk_prefix /etc/git.ico
12557
+ } else {
12558
+ catch {
12559
+ image create photo gitlogo -width 16 -height 16
12560
+
12561
+ image create photo gitlogominus -width 4 -height 2
12562
+ gitlogominus put #C00000 -to 0 0 4 2
12563
+ gitlogo copy gitlogominus -to 1 5
12564
+ gitlogo copy gitlogominus -to 6 5
12565
+ gitlogo copy gitlogominus -to 11 5
12566
+ image delete gitlogominus
12567
+
12568
+ image create photo gitlogoplus -width 4 -height 4
12569
+ gitlogoplus put #008000 -to 1 0 3 4
12570
+ gitlogoplus put #008000 -to 0 1 4 3
12571
+ gitlogo copy gitlogoplus -to 1 9
12572
+ gitlogo copy gitlogoplus -to 6 9
12573
+ gitlogo copy gitlogoplus -to 11 9
12574
+ image delete gitlogoplus
12575
+
12576
+ image create photo gitlogo32 -width 32 -height 32
12577
+ gitlogo32 copy gitlogo -zoom 2 2
12578
+
12579
+ wm iconphoto . -default gitlogo gitlogo32
12580
+ }
12571
12581
}
12572
12582
# wait for the window to become visible
12573
12583
tkwait visibility .
0 commit comments