@@ -2238,7 +2238,7 @@ proc makewindow {} {
2238
2238
global headctxmenu progresscanv progressitem progresscoords statusw
2239
2239
global fprogitem fprogcoord lastprogupdate progupdatepending
2240
2240
global rprogitem rprogcoord rownumsel numcommits
2241
- global have_tk85 use_ttk NS
2241
+ global have_tk85 have_tk86 use_ttk NS
2242
2242
global git_version
2243
2243
global worddiff
2244
2244
@@ -2736,8 +2736,13 @@ proc makewindow {} {
2736
2736
bind . <Key-Down> " selnextline 1"
2737
2737
bind . <Shift-Key-Up> " dofind -1 0"
2738
2738
bind . <Shift-Key-Down> " dofind 1 0"
2739
- bindkey <Key-Right> " goforw"
2740
- bindkey <Key-Left> " goback"
2739
+ if {$have_tk86 } {
2740
+ bindkey <<NextChar>> " goforw"
2741
+ bindkey <<PrevChar>> " goback"
2742
+ } else {
2743
+ bindkey <Key-Right> " goforw"
2744
+ bindkey <Key-Left> " goback"
2745
+ }
2741
2746
bind . <Key-Prior> " selnextpage -1"
2742
2747
bind . <Key-Next> " selnextpage 1"
2743
2748
bind . <$M1B -Home> " allcanvs yview moveto 0.0"
@@ -7855,7 +7860,7 @@ proc gettreeline {gtf id} {
7855
7860
if {[ string index $fname 0] eq " \" " } {
7856
7861
set fname [ lindex $fname 0]
7857
7862
}
7858
- set fname [ encoding convertfrom $fname ]
7863
+ set fname [ encoding convertfrom utf-8 $fname ]
7859
7864
lappend treefilelist($id ) $fname
7860
7865
}
7861
7866
if {![ eof $gtf ] } {
@@ -8117,7 +8122,7 @@ proc gettreediffline {gdtf ids} {
8117
8122
if {[ string index $file 0] eq " \" " } {
8118
8123
set file [ lindex $file 0]
8119
8124
}
8120
- set file [ encoding convertfrom $file ]
8125
+ set file [ encoding convertfrom utf-8 $file ]
8121
8126
if {$file ne [ lindex $treediff end] } {
8122
8127
lappend treediff $file
8123
8128
lappend sublist $file
@@ -8262,7 +8267,7 @@ proc makediffhdr {fname ids} {
8262
8267
global ctext curdiffstart treediffs diffencoding
8263
8268
global ctext_file_names jump_to_here targetline diffline
8264
8269
8265
- set fname [ encoding convertfrom $fname ]
8270
+ set fname [ encoding convertfrom utf-8 $fname ]
8266
8271
set diffencoding [ get_path_encoding $fname ]
8267
8272
set i [ lsearch -exact $treediffs($ids) $fname ]
8268
8273
if {$i >= 0} {
@@ -8324,7 +8329,7 @@ proc parseblobdiffline {ids line} {
8324
8329
8325
8330
if {![ string compare -length 5 " diff " $line ] } {
8326
8331
if {![ regexp {^diff (--cc|--git) } $line m type] } {
8327
- set line [ encoding convertfrom $line ]
8332
+ set line [ encoding convertfrom utf-8 $line ]
8328
8333
$ctext insert end " $line \n " hunksep
8329
8334
continue
8330
8335
}
@@ -8373,7 +8378,7 @@ proc parseblobdiffline {ids line} {
8373
8378
makediffhdr $fname $ids
8374
8379
8375
8380
} elseif {![ string compare -length 16 " * Unmerged path " $line ] } {
8376
- set fname [ encoding convertfrom [string range $line 16 end] ]
8381
+ set fname [ encoding convertfrom utf-8 [string range $line 16 end] ]
8377
8382
$ctext insert end " \n "
8378
8383
set curdiffstart [ $ctext index " end - 1c" ]
8379
8384
lappend ctext_file_names $fname
@@ -8426,7 +8431,7 @@ proc parseblobdiffline {ids line} {
8426
8431
if {[ string index $fname 0] eq " \" " } {
8427
8432
set fname [ lindex $fname 0]
8428
8433
}
8429
- set fname [ encoding convertfrom $fname ]
8434
+ set fname [ encoding convertfrom utf-8 $fname ]
8430
8435
set i [ lsearch -exact $treediffs($ids) $fname ]
8431
8436
if {$i >= 0} {
8432
8437
setinlist difffilestart $i $curdiffstart
@@ -8445,6 +8450,7 @@ proc parseblobdiffline {ids line} {
8445
8450
set diffinhdr 0
8446
8451
return
8447
8452
}
8453
+ set line [ encoding convertfrom utf-8 $line ]
8448
8454
$ctext insert end " $line \n " filesep
8449
8455
8450
8456
} else {
@@ -10203,7 +10209,7 @@ proc showrefs {} {
10203
10209
text $top .list -background $bgcolor -foreground $fgcolor \
10204
10210
-selectbackground $selectbgcolor -font mainfont \
10205
10211
-xscrollcommand " $top .xsb set" -yscrollcommand " $top .ysb set" \
10206
- -width 30 -height 20 -cursor $maincursor \
10212
+ -width 60 -height 20 -cursor $maincursor \
10207
10213
-spacing1 1 -spacing3 1 -state disabled
10208
10214
$top .list tag configure highlight -background $selectbgcolor
10209
10215
if {![ lsearch -exact $bglist $top .list] } {
@@ -12440,7 +12446,7 @@ proc cache_gitattr {attr pathlist} {
12440
12446
foreach row [ split $rlist " \n " ] {
12441
12447
if {[ regexp "(.*): $attr : (.*)" $row m path value] } {
12442
12448
if {[ string index $path 0] eq " \" " } {
12443
- set path [ encoding convertfrom [lindex $path 0] ]
12449
+ set path [ encoding convertfrom utf-8 [lindex $path 0] ]
12444
12450
}
12445
12451
set path_attr_cache($attr ,$path ) $value
12446
12452
}
@@ -12470,7 +12476,6 @@ if { [info exists ::env(GITK_MSGSDIR)] } {
12470
12476
set gitk_prefix [ file dirname [file dirname [file normalize $argv0 ] ]]
12471
12477
set gitk_libdir [ file join $gitk_prefix share gitk lib]
12472
12478
set gitk_msgsdir [ file join $gitk_libdir msgs]
12473
- unset gitk_prefix
12474
12479
}
12475
12480
12476
12481
## Internationalization (i18n) through msgcat and gettext. See
@@ -12772,6 +12777,7 @@ set nullid2 "0000000000000000000000000000000000000001"
12772
12777
set nullfile " /dev/null"
12773
12778
12774
12779
set have_tk85 [ expr {[package vcompare $tk_version " 8.5" ] >= 0}]
12780
+ set have_tk86 [ expr {[package vcompare $tk_version " 8.6" ] >= 0}]
12775
12781
if {![ info exists have_ttk] } {
12776
12782
set have_ttk [ llength [info commands ::ttk::style] ]
12777
12783
}
@@ -12836,28 +12842,32 @@ if {[expr {[exec git rev-parse --is-inside-work-tree] == "true"}]} {
12836
12842
set worktree [ gitworktree]
12837
12843
setcoords
12838
12844
makewindow
12839
- catch {
12840
- image create photo gitlogo -width 16 -height 16
12841
-
12842
- image create photo gitlogominus -width 4 -height 2
12843
- gitlogominus put #C00000 -to 0 0 4 2
12844
- gitlogo copy gitlogominus -to 1 5
12845
- gitlogo copy gitlogominus -to 6 5
12846
- gitlogo copy gitlogominus -to 11 5
12847
- image delete gitlogominus
12848
-
12849
- image create photo gitlogoplus -width 4 -height 4
12850
- gitlogoplus put #008000 -to 1 0 3 4
12851
- gitlogoplus put #008000 -to 0 1 4 3
12852
- gitlogo copy gitlogoplus -to 1 9
12853
- gitlogo copy gitlogoplus -to 6 9
12854
- gitlogo copy gitlogoplus -to 11 9
12855
- image delete gitlogoplus
12856
-
12857
- image create photo gitlogo32 -width 32 -height 32
12858
- gitlogo32 copy gitlogo -zoom 2 2
12859
-
12860
- wm iconphoto . -default gitlogo gitlogo32
12845
+ if {$::tcl_platform(platform) eq {windows} && [ file exists $gitk_prefix /etc/git.ico] } {
12846
+ wm iconbitmap . -default $gitk_prefix /etc/git.ico
12847
+ } else {
12848
+ catch {
12849
+ image create photo gitlogo -width 16 -height 16
12850
+
12851
+ image create photo gitlogominus -width 4 -height 2
12852
+ gitlogominus put #C00000 -to 0 0 4 2
12853
+ gitlogo copy gitlogominus -to 1 5
12854
+ gitlogo copy gitlogominus -to 6 5
12855
+ gitlogo copy gitlogominus -to 11 5
12856
+ image delete gitlogominus
12857
+
12858
+ image create photo gitlogoplus -width 4 -height 4
12859
+ gitlogoplus put #008000 -to 1 0 3 4
12860
+ gitlogoplus put #008000 -to 0 1 4 3
12861
+ gitlogo copy gitlogoplus -to 1 9
12862
+ gitlogo copy gitlogoplus -to 6 9
12863
+ gitlogo copy gitlogoplus -to 11 9
12864
+ image delete gitlogoplus
12865
+
12866
+ image create photo gitlogo32 -width 32 -height 32
12867
+ gitlogo32 copy gitlogo -zoom 2 2
12868
+
12869
+ wm iconphoto . -default gitlogo gitlogo32
12870
+ }
12861
12871
}
12862
12872
# wait for the window to become visible
12863
12873
if {![ winfo viewable .] } {tkwait visibility .}
0 commit comments