@@ -2099,7 +2099,7 @@ proc makewindow {} {
2099
2099
global headctxmenu progresscanv progressitem progresscoords statusw
2100
2100
global fprogitem fprogcoord lastprogupdate progupdatepending
2101
2101
global rprogitem rprogcoord rownumsel numcommits
2102
- global have_tk85 use_ttk NS
2102
+ global have_tk85 have_tk86 use_ttk NS
2103
2103
global git_version
2104
2104
global worddiff
2105
2105
@@ -2597,8 +2597,13 @@ proc makewindow {} {
2597
2597
bind . <Key-Down> " selnextline 1"
2598
2598
bind . <Shift-Key-Up> " dofind -1 0"
2599
2599
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
+ }
2602
2607
bind . <Key-Prior> " selnextpage -1"
2603
2608
bind . <Key-Next> " selnextpage 1"
2604
2609
bind . <$M1B -Home> " allcanvs yview moveto 0.0"
@@ -7709,7 +7714,7 @@ proc gettreeline {gtf id} {
7709
7714
if {[string index $fname 0] eq " \" " } {
7710
7715
set fname [lindex $fname 0]
7711
7716
}
7712
- set fname [encoding convertfrom $fname ]
7717
+ set fname [encoding convertfrom utf-8 $fname ]
7713
7718
lappend treefilelist($id ) $fname
7714
7719
}
7715
7720
if {![eof $gtf ]} {
@@ -7971,7 +7976,7 @@ proc gettreediffline {gdtf ids} {
7971
7976
if {[string index $file 0] eq " \" " } {
7972
7977
set file [lindex $file 0]
7973
7978
}
7974
- set file [encoding convertfrom $file ]
7979
+ set file [encoding convertfrom utf-8 $file ]
7975
7980
if {$file ne [lindex $treediff end]} {
7976
7981
lappend treediff $file
7977
7982
lappend sublist $file
@@ -8116,7 +8121,7 @@ proc makediffhdr {fname ids} {
8116
8121
global ctext curdiffstart treediffs diffencoding
8117
8122
global ctext_file_names jump_to_here targetline diffline
8118
8123
8119
- set fname [encoding convertfrom $fname ]
8124
+ set fname [encoding convertfrom utf-8 $fname ]
8120
8125
set diffencoding [get_path_encoding $fname ]
8121
8126
set i [lsearch -exact $treediffs($ids) $fname ]
8122
8127
if {$i >= 0} {
@@ -8178,7 +8183,7 @@ proc parseblobdiffline {ids line} {
8178
8183
8179
8184
if {![string compare -length 5 " diff " $line ]} {
8180
8185
if {![regexp {^diff (--cc|--git) } $line m type]} {
8181
- set line [encoding convertfrom $line ]
8186
+ set line [encoding convertfrom utf-8 $line ]
8182
8187
$ctext insert end " $line \n " hunksep
8183
8188
continue
8184
8189
}
@@ -8227,7 +8232,7 @@ proc parseblobdiffline {ids line} {
8227
8232
makediffhdr $fname $ids
8228
8233
8229
8234
} 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]]
8231
8236
$ctext insert end " \n "
8232
8237
set curdiffstart [$ctext index " end - 1c" ]
8233
8238
lappend ctext_file_names $fname
@@ -8280,7 +8285,7 @@ proc parseblobdiffline {ids line} {
8280
8285
if {[string index $fname 0] eq " \" " } {
8281
8286
set fname [lindex $fname 0]
8282
8287
}
8283
- set fname [encoding convertfrom $fname ]
8288
+ set fname [encoding convertfrom utf-8 $fname ]
8284
8289
set i [lsearch -exact $treediffs($ids) $fname ]
8285
8290
if {$i >= 0} {
8286
8291
setinlist difffilestart $i $curdiffstart
@@ -8299,6 +8304,7 @@ proc parseblobdiffline {ids line} {
8299
8304
set diffinhdr 0
8300
8305
return
8301
8306
}
8307
+ set line [encoding convertfrom utf-8 $line ]
8302
8308
$ctext insert end " $line \n " filesep
8303
8309
8304
8310
} else {
@@ -10057,7 +10063,7 @@ proc showrefs {} {
10057
10063
text $top .list -background $bgcolor -foreground $fgcolor \
10058
10064
-selectbackground $selectbgcolor -font mainfont \
10059
10065
-xscrollcommand " $top .xsb set" -yscrollcommand " $top .ysb set" \
10060
- -width 30 -height 20 -cursor $maincursor \
10066
+ -width 60 -height 20 -cursor $maincursor \
10061
10067
-spacing1 1 -spacing3 1 -state disabled
10062
10068
$top .list tag configure highlight -background $selectbgcolor
10063
10069
if {![lsearch -exact $bglist $top .list]} {
@@ -12267,7 +12273,7 @@ proc cache_gitattr {attr pathlist} {
12267
12273
foreach row [split $rlist " \n " ] {
12268
12274
if {[regexp "(.*): $attr : (.*)" $row m path value]} {
12269
12275
if {[string index $path 0] eq " \" " } {
12270
- set path [encoding convertfrom [lindex $path 0]]
12276
+ set path [encoding convertfrom utf-8 [lindex $path 0]]
12271
12277
}
12272
12278
set path_attr_cache($attr ,$path ) $value
12273
12279
}
@@ -12297,7 +12303,6 @@ if { [info exists ::env(GITK_MSGSDIR)] } {
12297
12303
set gitk_prefix [file dirname [file dirname [file normalize $argv0 ]]]
12298
12304
set gitk_libdir [file join $gitk_prefix share gitk lib]
12299
12305
set gitk_msgsdir [file join $gitk_libdir msgs]
12300
- unset gitk_prefix
12301
12306
}
12302
12307
12303
12308
# # Internationalization (i18n) through msgcat and gettext. See
@@ -12596,6 +12601,7 @@ set nullid2 "0000000000000000000000000000000000000001"
12596
12601
set nullfile " /dev/null"
12597
12602
12598
12603
set have_tk85 [expr {[package vcompare $tk_version " 8.5" ] >= 0}]
12604
+ set have_tk86 [expr {[package vcompare $tk_version " 8.6" ] >= 0}]
12599
12605
if {![info exists have_ttk]} {
12600
12606
set have_ttk [llength [info commands ::ttk::style]]
12601
12607
}
@@ -12660,28 +12666,32 @@ if {[expr {[exec git rev-parse --is-inside-work-tree] == "true"}]} {
12660
12666
set worktree [gitworktree]
12661
12667
setcoords
12662
12668
makewindow
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
+ }
12685
12695
}
12686
12696
# wait for the window to become visible
12687
12697
tkwait visibility .
0 commit comments