@@ -2099,7 +2099,7 @@ proc makewindow {} {
20992099 global headctxmenu progresscanv progressitem progresscoords statusw
21002100 global fprogitem fprogcoord lastprogupdate progupdatepending
21012101 global rprogitem rprogcoord rownumsel numcommits
2102- global have_tk85 use_ttk NS
2102+ global have_tk85 have_tk86 use_ttk NS
21032103 global git_version
21042104 global worddiff
21052105
@@ -2597,8 +2597,13 @@ proc makewindow {} {
25972597 bind . <Key-Down> " selnextline 1"
25982598 bind . <Shift-Key-Up> " dofind -1 0"
25992599 bind . <Shift-Key-Down> " dofind 1 0"
2600- bindkey <Key-Right> " goforw"
2601- bindkey <Key-Left> " goback"
2600+ if {$have_tk86 } {
2601+ bindkey <<NextChar>> " goforw"
2602+ bindkey <<PrevChar>> " goback"
2603+ } else {
2604+ bindkey <Key-Right> " goforw"
2605+ bindkey <Key-Left> " goback"
2606+ }
26022607 bind . <Key-Prior> " selnextpage -1"
26032608 bind . <Key-Next> " selnextpage 1"
26042609 bind . <$M1B -Home> " allcanvs yview moveto 0.0"
@@ -7709,7 +7714,7 @@ proc gettreeline {gtf id} {
77097714 if {[string index $fname 0] eq " \" " } {
77107715 set fname [lindex $fname 0]
77117716 }
7712- set fname [encoding convertfrom $fname ]
7717+ set fname [encoding convertfrom utf-8 $fname ]
77137718 lappend treefilelist($id ) $fname
77147719 }
77157720 if {![eof $gtf ]} {
@@ -7971,7 +7976,7 @@ proc gettreediffline {gdtf ids} {
79717976 if {[string index $file 0] eq " \" " } {
79727977 set file [lindex $file 0]
79737978 }
7974- set file [encoding convertfrom $file ]
7979+ set file [encoding convertfrom utf-8 $file ]
79757980 if {$file ne [lindex $treediff end]} {
79767981 lappend treediff $file
79777982 lappend sublist $file
@@ -8116,7 +8121,7 @@ proc makediffhdr {fname ids} {
81168121 global ctext curdiffstart treediffs diffencoding
81178122 global ctext_file_names jump_to_here targetline diffline
81188123
8119- set fname [encoding convertfrom $fname ]
8124+ set fname [encoding convertfrom utf-8 $fname ]
81208125 set diffencoding [get_path_encoding $fname ]
81218126 set i [lsearch -exact $treediffs($ids) $fname ]
81228127 if {$i >= 0} {
@@ -8178,7 +8183,7 @@ proc parseblobdiffline {ids line} {
81788183
81798184 if {![string compare -length 5 " diff " $line ]} {
81808185 if {![regexp {^diff (--cc|--git) } $line m type]} {
8181- set line [encoding convertfrom $line ]
8186+ set line [encoding convertfrom utf-8 $line ]
81828187 $ctext insert end " $line \n " hunksep
81838188 continue
81848189 }
@@ -8227,7 +8232,7 @@ proc parseblobdiffline {ids line} {
82278232 makediffhdr $fname $ids
82288233
82298234 } elseif {![string compare -length 16 " * Unmerged path " $line ]} {
8230- set fname [encoding convertfrom [string range $line 16 end]]
8235+ set fname [encoding convertfrom utf-8 [string range $line 16 end]]
82318236 $ctext insert end " \n "
82328237 set curdiffstart [$ctext index " end - 1c" ]
82338238 lappend ctext_file_names $fname
@@ -8280,7 +8285,7 @@ proc parseblobdiffline {ids line} {
82808285 if {[string index $fname 0] eq " \" " } {
82818286 set fname [lindex $fname 0]
82828287 }
8283- set fname [encoding convertfrom $fname ]
8288+ set fname [encoding convertfrom utf-8 $fname ]
82848289 set i [lsearch -exact $treediffs($ids) $fname ]
82858290 if {$i >= 0} {
82868291 setinlist difffilestart $i $curdiffstart
@@ -8299,6 +8304,7 @@ proc parseblobdiffline {ids line} {
82998304 set diffinhdr 0
83008305 return
83018306 }
8307+ set line [encoding convertfrom utf-8 $line ]
83028308 $ctext insert end " $line \n " filesep
83038309
83048310 } else {
@@ -10057,7 +10063,7 @@ proc showrefs {} {
1005710063 text $top .list -background $bgcolor -foreground $fgcolor \
1005810064 -selectbackground $selectbgcolor -font mainfont \
1005910065 -xscrollcommand " $top .xsb set" -yscrollcommand " $top .ysb set" \
10060- -width 30 -height 20 -cursor $maincursor \
10066+ -width 60 -height 20 -cursor $maincursor \
1006110067 -spacing1 1 -spacing3 1 -state disabled
1006210068 $top .list tag configure highlight -background $selectbgcolor
1006310069 if {![lsearch -exact $bglist $top .list]} {
@@ -12267,7 +12273,7 @@ proc cache_gitattr {attr pathlist} {
1226712273 foreach row [split $rlist " \n " ] {
1226812274 if {[regexp "(.*): $attr : (.*)" $row m path value]} {
1226912275 if {[string index $path 0] eq " \" " } {
12270- set path [encoding convertfrom [lindex $path 0]]
12276+ set path [encoding convertfrom utf-8 [lindex $path 0]]
1227112277 }
1227212278 set path_attr_cache($attr ,$path ) $value
1227312279 }
@@ -12297,7 +12303,6 @@ if { [info exists ::env(GITK_MSGSDIR)] } {
1229712303 set gitk_prefix [file dirname [file dirname [file normalize $argv0 ]]]
1229812304 set gitk_libdir [file join $gitk_prefix share gitk lib]
1229912305 set gitk_msgsdir [file join $gitk_libdir msgs]
12300- unset gitk_prefix
1230112306}
1230212307
1230312308# # Internationalization (i18n) through msgcat and gettext. See
@@ -12596,6 +12601,7 @@ set nullid2 "0000000000000000000000000000000000000001"
1259612601set nullfile " /dev/null"
1259712602
1259812603set have_tk85 [expr {[package vcompare $tk_version " 8.5" ] >= 0}]
12604+ set have_tk86 [expr {[package vcompare $tk_version " 8.6" ] >= 0}]
1259912605if {![info exists have_ttk]} {
1260012606 set have_ttk [llength [info commands ::ttk::style]]
1260112607}
@@ -12660,28 +12666,32 @@ if {[expr {[exec git rev-parse --is-inside-work-tree] == "true"}]} {
1266012666set worktree [gitworktree]
1266112667setcoords
1266212668makewindow
12663- catch {
12664- image create photo gitlogo -width 16 -height 16
12665-
12666- image create photo gitlogominus -width 4 -height 2
12667- gitlogominus put #C00000 -to 0 0 4 2
12668- gitlogo copy gitlogominus -to 1 5
12669- gitlogo copy gitlogominus -to 6 5
12670- gitlogo copy gitlogominus -to 11 5
12671- image delete gitlogominus
12672-
12673- image create photo gitlogoplus -width 4 -height 4
12674- gitlogoplus put #008000 -to 1 0 3 4
12675- gitlogoplus put #008000 -to 0 1 4 3
12676- gitlogo copy gitlogoplus -to 1 9
12677- gitlogo copy gitlogoplus -to 6 9
12678- gitlogo copy gitlogoplus -to 11 9
12679- image delete gitlogoplus
12680-
12681- image create photo gitlogo32 -width 32 -height 32
12682- gitlogo32 copy gitlogo -zoom 2 2
12683-
12684- wm iconphoto . -default gitlogo gitlogo32
12669+ if {$::tcl_platform(platform) eq {windows} && [file exists $gitk_prefix /etc/git.ico]} {
12670+ wm iconbitmap . -default $gitk_prefix /etc/git.ico
12671+ } else {
12672+ catch {
12673+ image create photo gitlogo -width 16 -height 16
12674+
12675+ image create photo gitlogominus -width 4 -height 2
12676+ gitlogominus put #C00000 -to 0 0 4 2
12677+ gitlogo copy gitlogominus -to 1 5
12678+ gitlogo copy gitlogominus -to 6 5
12679+ gitlogo copy gitlogominus -to 11 5
12680+ image delete gitlogominus
12681+
12682+ image create photo gitlogoplus -width 4 -height 4
12683+ gitlogoplus put #008000 -to 1 0 3 4
12684+ gitlogoplus put #008000 -to 0 1 4 3
12685+ gitlogo copy gitlogoplus -to 1 9
12686+ gitlogo copy gitlogoplus -to 6 9
12687+ gitlogo copy gitlogoplus -to 11 9
12688+ image delete gitlogoplus
12689+
12690+ image create photo gitlogo32 -width 32 -height 32
12691+ gitlogo32 copy gitlogo -zoom 2 2
12692+
12693+ wm iconphoto . -default gitlogo gitlogo32
12694+ }
1268512695}
1268612696# wait for the window to become visible
1268712697tkwait visibility .
0 commit comments