@@ -2234,7 +2234,7 @@ proc makewindow {} {
2234
2234
global headctxmenu progresscanv progressitem progresscoords statusw
2235
2235
global fprogitem fprogcoord lastprogupdate progupdatepending
2236
2236
global rprogitem rprogcoord rownumsel numcommits
2237
- global have_tk85 use_ttk NS
2237
+ global have_tk85 have_tk86 use_ttk NS
2238
2238
global git_version
2239
2239
global worddiff
2240
2240
@@ -2732,8 +2732,13 @@ proc makewindow {} {
2732
2732
bind . <Key-Down> " selnextline 1"
2733
2733
bind . <Shift-Key-Up> " dofind -1 0"
2734
2734
bind . <Shift-Key-Down> " dofind 1 0"
2735
- bindkey <Key-Right> " goforw"
2736
- bindkey <Key-Left> " goback"
2735
+ if {$have_tk86 } {
2736
+ bindkey <<NextChar>> " goforw"
2737
+ bindkey <<PrevChar>> " goback"
2738
+ } else {
2739
+ bindkey <Key-Right> " goforw"
2740
+ bindkey <Key-Left> " goback"
2741
+ }
2737
2742
bind . <Key-Prior> " selnextpage -1"
2738
2743
bind . <Key-Next> " selnextpage 1"
2739
2744
bind . <$M1B -Home> " allcanvs yview moveto 0.0"
@@ -7847,7 +7852,7 @@ proc gettreeline {gtf id} {
7847
7852
if {[ string index $fname 0] eq " \" " } {
7848
7853
set fname [ lindex $fname 0]
7849
7854
}
7850
- set fname [ encoding convertfrom $fname ]
7855
+ set fname [ encoding convertfrom utf-8 $fname ]
7851
7856
lappend treefilelist($id ) $fname
7852
7857
}
7853
7858
if {![ eof $gtf ] } {
@@ -8109,7 +8114,7 @@ proc gettreediffline {gdtf ids} {
8109
8114
if {[ string index $file 0] eq " \" " } {
8110
8115
set file [ lindex $file 0]
8111
8116
}
8112
- set file [ encoding convertfrom $file ]
8117
+ set file [ encoding convertfrom utf-8 $file ]
8113
8118
if {$file ne [ lindex $treediff end] } {
8114
8119
lappend treediff $file
8115
8120
lappend sublist $file
@@ -8254,7 +8259,7 @@ proc makediffhdr {fname ids} {
8254
8259
global ctext curdiffstart treediffs diffencoding
8255
8260
global ctext_file_names jump_to_here targetline diffline
8256
8261
8257
- set fname [ encoding convertfrom $fname ]
8262
+ set fname [ encoding convertfrom utf-8 $fname ]
8258
8263
set diffencoding [ get_path_encoding $fname ]
8259
8264
set i [ lsearch -exact $treediffs($ids) $fname ]
8260
8265
if {$i >= 0} {
@@ -8316,7 +8321,7 @@ proc parseblobdiffline {ids line} {
8316
8321
8317
8322
if {![ string compare -length 5 " diff " $line ] } {
8318
8323
if {![ regexp {^diff (--cc|--git) } $line m type] } {
8319
- set line [ encoding convertfrom $line ]
8324
+ set line [ encoding convertfrom utf-8 $line ]
8320
8325
$ctext insert end " $line \n " hunksep
8321
8326
continue
8322
8327
}
@@ -8365,7 +8370,7 @@ proc parseblobdiffline {ids line} {
8365
8370
makediffhdr $fname $ids
8366
8371
8367
8372
} elseif {![ string compare -length 16 " * Unmerged path " $line ] } {
8368
- set fname [ encoding convertfrom [string range $line 16 end] ]
8373
+ set fname [ encoding convertfrom utf-8 [string range $line 16 end] ]
8369
8374
$ctext insert end " \n "
8370
8375
set curdiffstart [ $ctext index " end - 1c" ]
8371
8376
lappend ctext_file_names $fname
@@ -8418,7 +8423,7 @@ proc parseblobdiffline {ids line} {
8418
8423
if {[ string index $fname 0] eq " \" " } {
8419
8424
set fname [ lindex $fname 0]
8420
8425
}
8421
- set fname [ encoding convertfrom $fname ]
8426
+ set fname [ encoding convertfrom utf-8 $fname ]
8422
8427
set i [ lsearch -exact $treediffs($ids) $fname ]
8423
8428
if {$i >= 0} {
8424
8429
setinlist difffilestart $i $curdiffstart
@@ -8437,6 +8442,7 @@ proc parseblobdiffline {ids line} {
8437
8442
set diffinhdr 0
8438
8443
return
8439
8444
}
8445
+ set line [ encoding convertfrom utf-8 $line ]
8440
8446
$ctext insert end " $line \n " filesep
8441
8447
8442
8448
} else {
@@ -10195,7 +10201,7 @@ proc showrefs {} {
10195
10201
text $top .list -background $bgcolor -foreground $fgcolor \
10196
10202
-selectbackground $selectbgcolor -font mainfont \
10197
10203
-xscrollcommand " $top .xsb set" -yscrollcommand " $top .ysb set" \
10198
- -width 30 -height 20 -cursor $maincursor \
10204
+ -width 60 -height 20 -cursor $maincursor \
10199
10205
-spacing1 1 -spacing3 1 -state disabled
10200
10206
$top .list tag configure highlight -background $selectbgcolor
10201
10207
if {![ lsearch -exact $bglist $top .list] } {
@@ -12405,7 +12411,7 @@ proc cache_gitattr {attr pathlist} {
12405
12411
foreach row [ split $rlist " \n " ] {
12406
12412
if {[ regexp "(.*): $attr : (.*)" $row m path value] } {
12407
12413
if {[ string index $path 0] eq " \" " } {
12408
- set path [ encoding convertfrom [lindex $path 0] ]
12414
+ set path [ encoding convertfrom utf-8 [lindex $path 0] ]
12409
12415
}
12410
12416
set path_attr_cache($attr ,$path ) $value
12411
12417
}
@@ -12435,7 +12441,6 @@ if { [info exists ::env(GITK_MSGSDIR)] } {
12435
12441
set gitk_prefix [ file dirname [file dirname [file normalize $argv0 ] ]]
12436
12442
set gitk_libdir [ file join $gitk_prefix share gitk lib]
12437
12443
set gitk_msgsdir [ file join $gitk_libdir msgs]
12438
- unset gitk_prefix
12439
12444
}
12440
12445
12441
12446
## Internationalization (i18n) through msgcat and gettext. See
@@ -12734,6 +12739,7 @@ set nullid2 "0000000000000000000000000000000000000001"
12734
12739
set nullfile " /dev/null"
12735
12740
12736
12741
set have_tk85 [ expr {[package vcompare $tk_version " 8.5" ] >= 0}]
12742
+ set have_tk86 [ expr {[package vcompare $tk_version " 8.6" ] >= 0}]
12737
12743
if {![ info exists have_ttk] } {
12738
12744
set have_ttk [ llength [info commands ::ttk::style] ]
12739
12745
}
@@ -12798,28 +12804,32 @@ if {[expr {[exec git rev-parse --is-inside-work-tree] == "true"}]} {
12798
12804
set worktree [ gitworktree]
12799
12805
setcoords
12800
12806
makewindow
12801
- catch {
12802
- image create photo gitlogo -width 16 -height 16
12803
-
12804
- image create photo gitlogominus -width 4 -height 2
12805
- gitlogominus put #C00000 -to 0 0 4 2
12806
- gitlogo copy gitlogominus -to 1 5
12807
- gitlogo copy gitlogominus -to 6 5
12808
- gitlogo copy gitlogominus -to 11 5
12809
- image delete gitlogominus
12810
-
12811
- image create photo gitlogoplus -width 4 -height 4
12812
- gitlogoplus put #008000 -to 1 0 3 4
12813
- gitlogoplus put #008000 -to 0 1 4 3
12814
- gitlogo copy gitlogoplus -to 1 9
12815
- gitlogo copy gitlogoplus -to 6 9
12816
- gitlogo copy gitlogoplus -to 11 9
12817
- image delete gitlogoplus
12818
-
12819
- image create photo gitlogo32 -width 32 -height 32
12820
- gitlogo32 copy gitlogo -zoom 2 2
12821
-
12822
- wm iconphoto . -default gitlogo gitlogo32
12807
+ if {$::tcl_platform(platform) eq {windows} && [ file exists $gitk_prefix /etc/git.ico] } {
12808
+ wm iconbitmap . -default $gitk_prefix /etc/git.ico
12809
+ } else {
12810
+ catch {
12811
+ image create photo gitlogo -width 16 -height 16
12812
+
12813
+ image create photo gitlogominus -width 4 -height 2
12814
+ gitlogominus put #C00000 -to 0 0 4 2
12815
+ gitlogo copy gitlogominus -to 1 5
12816
+ gitlogo copy gitlogominus -to 6 5
12817
+ gitlogo copy gitlogominus -to 11 5
12818
+ image delete gitlogominus
12819
+
12820
+ image create photo gitlogoplus -width 4 -height 4
12821
+ gitlogoplus put #008000 -to 1 0 3 4
12822
+ gitlogoplus put #008000 -to 0 1 4 3
12823
+ gitlogo copy gitlogoplus -to 1 9
12824
+ gitlogo copy gitlogoplus -to 6 9
12825
+ gitlogo copy gitlogoplus -to 11 9
12826
+ image delete gitlogoplus
12827
+
12828
+ image create photo gitlogo32 -width 32 -height 32
12829
+ gitlogo32 copy gitlogo -zoom 2 2
12830
+
12831
+ wm iconphoto . -default gitlogo gitlogo32
12832
+ }
12823
12833
}
12824
12834
# wait for the window to become visible
12825
12835
tkwait visibility .
0 commit comments