@@ -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"
@@ -7712,7 +7717,7 @@ proc gettreeline {gtf id} {
7712
7717
if {[string index $fname 0] eq " \" " } {
7713
7718
set fname [lindex $fname 0]
7714
7719
}
7715
- set fname [encoding convertfrom $fname ]
7720
+ set fname [encoding convertfrom utf-8 $fname ]
7716
7721
lappend treefilelist($id ) $fname
7717
7722
}
7718
7723
if {![eof $gtf ]} {
@@ -7974,7 +7979,7 @@ proc gettreediffline {gdtf ids} {
7974
7979
if {[string index $file 0] eq " \" " } {
7975
7980
set file [lindex $file 0]
7976
7981
}
7977
- set file [encoding convertfrom $file ]
7982
+ set file [encoding convertfrom utf-8 $file ]
7978
7983
if {$file ne [lindex $treediff end]} {
7979
7984
lappend treediff $file
7980
7985
lappend sublist $file
@@ -8119,7 +8124,7 @@ proc makediffhdr {fname ids} {
8119
8124
global ctext curdiffstart treediffs diffencoding
8120
8125
global ctext_file_names jump_to_here targetline diffline
8121
8126
8122
- set fname [encoding convertfrom $fname ]
8127
+ set fname [encoding convertfrom utf-8 $fname ]
8123
8128
set diffencoding [get_path_encoding $fname ]
8124
8129
set i [lsearch -exact $treediffs($ids) $fname ]
8125
8130
if {$i >= 0} {
@@ -8181,7 +8186,7 @@ proc parseblobdiffline {ids line} {
8181
8186
8182
8187
if {![string compare -length 5 " diff " $line ]} {
8183
8188
if {![regexp {^diff (--cc|--git) } $line m type]} {
8184
- set line [encoding convertfrom $line ]
8189
+ set line [encoding convertfrom utf-8 $line ]
8185
8190
$ctext insert end " $line \n " hunksep
8186
8191
continue
8187
8192
}
@@ -8230,7 +8235,7 @@ proc parseblobdiffline {ids line} {
8230
8235
makediffhdr $fname $ids
8231
8236
8232
8237
} elseif {![string compare -length 16 " * Unmerged path " $line ]} {
8233
- set fname [encoding convertfrom [string range $line 16 end]]
8238
+ set fname [encoding convertfrom utf-8 [string range $line 16 end]]
8234
8239
$ctext insert end " \n "
8235
8240
set curdiffstart [$ctext index " end - 1c" ]
8236
8241
lappend ctext_file_names $fname
@@ -8283,7 +8288,7 @@ proc parseblobdiffline {ids line} {
8283
8288
if {[string index $fname 0] eq " \" " } {
8284
8289
set fname [lindex $fname 0]
8285
8290
}
8286
- set fname [encoding convertfrom $fname ]
8291
+ set fname [encoding convertfrom utf-8 $fname ]
8287
8292
set i [lsearch -exact $treediffs($ids) $fname ]
8288
8293
if {$i >= 0} {
8289
8294
setinlist difffilestart $i $curdiffstart
@@ -8302,6 +8307,7 @@ proc parseblobdiffline {ids line} {
8302
8307
set diffinhdr 0
8303
8308
return
8304
8309
}
8310
+ set line [encoding convertfrom utf-8 $line ]
8305
8311
$ctext insert end " $line \n " filesep
8306
8312
8307
8313
} else {
@@ -10060,7 +10066,7 @@ proc showrefs {} {
10060
10066
text $top .list -background $bgcolor -foreground $fgcolor \
10061
10067
-selectbackground $selectbgcolor -font mainfont \
10062
10068
-xscrollcommand " $top .xsb set" -yscrollcommand " $top .ysb set" \
10063
- -width 30 -height 20 -cursor $maincursor \
10069
+ -width 60 -height 20 -cursor $maincursor \
10064
10070
-spacing1 1 -spacing3 1 -state disabled
10065
10071
$top .list tag configure highlight -background $selectbgcolor
10066
10072
if {![lsearch -exact $bglist $top .list]} {
@@ -12270,7 +12276,7 @@ proc cache_gitattr {attr pathlist} {
12270
12276
foreach row [split $rlist " \n " ] {
12271
12277
if {[regexp "(.*): $attr : (.*)" $row m path value]} {
12272
12278
if {[string index $path 0] eq " \" " } {
12273
- set path [encoding convertfrom [lindex $path 0]]
12279
+ set path [encoding convertfrom utf-8 [lindex $path 0]]
12274
12280
}
12275
12281
set path_attr_cache($attr ,$path ) $value
12276
12282
}
@@ -12300,7 +12306,6 @@ if { [info exists ::env(GITK_MSGSDIR)] } {
12300
12306
set gitk_prefix [file dirname [file dirname [file normalize $argv0 ]]]
12301
12307
set gitk_libdir [file join $gitk_prefix share gitk lib]
12302
12308
set gitk_msgsdir [file join $gitk_libdir msgs]
12303
- unset gitk_prefix
12304
12309
}
12305
12310
12306
12311
# # Internationalization (i18n) through msgcat and gettext. See
@@ -12599,6 +12604,7 @@ set nullid2 "0000000000000000000000000000000000000001"
12599
12604
set nullfile " /dev/null"
12600
12605
12601
12606
set have_tk85 [expr {[package vcompare $tk_version " 8.5" ] >= 0}]
12607
+ set have_tk86 [expr {[package vcompare $tk_version " 8.6" ] >= 0}]
12602
12608
if {![info exists have_ttk]} {
12603
12609
set have_ttk [llength [info commands ::ttk::style]]
12604
12610
}
@@ -12663,28 +12669,32 @@ if {[expr {[exec git rev-parse --is-inside-work-tree] == "true"}]} {
12663
12669
set worktree [gitworktree]
12664
12670
setcoords
12665
12671
makewindow
12666
- catch {
12667
- image create photo gitlogo -width 16 -height 16
12668
-
12669
- image create photo gitlogominus -width 4 -height 2
12670
- gitlogominus put #C00000 -to 0 0 4 2
12671
- gitlogo copy gitlogominus -to 1 5
12672
- gitlogo copy gitlogominus -to 6 5
12673
- gitlogo copy gitlogominus -to 11 5
12674
- image delete gitlogominus
12675
-
12676
- image create photo gitlogoplus -width 4 -height 4
12677
- gitlogoplus put #008000 -to 1 0 3 4
12678
- gitlogoplus put #008000 -to 0 1 4 3
12679
- gitlogo copy gitlogoplus -to 1 9
12680
- gitlogo copy gitlogoplus -to 6 9
12681
- gitlogo copy gitlogoplus -to 11 9
12682
- image delete gitlogoplus
12683
-
12684
- image create photo gitlogo32 -width 32 -height 32
12685
- gitlogo32 copy gitlogo -zoom 2 2
12686
-
12687
- wm iconphoto . -default gitlogo gitlogo32
12672
+ if {$::tcl_platform(platform) eq {windows} && [file exists $gitk_prefix /etc/git.ico]} {
12673
+ wm iconbitmap . -default $gitk_prefix /etc/git.ico
12674
+ } else {
12675
+ catch {
12676
+ image create photo gitlogo -width 16 -height 16
12677
+
12678
+ image create photo gitlogominus -width 4 -height 2
12679
+ gitlogominus put #C00000 -to 0 0 4 2
12680
+ gitlogo copy gitlogominus -to 1 5
12681
+ gitlogo copy gitlogominus -to 6 5
12682
+ gitlogo copy gitlogominus -to 11 5
12683
+ image delete gitlogominus
12684
+
12685
+ image create photo gitlogoplus -width 4 -height 4
12686
+ gitlogoplus put #008000 -to 1 0 3 4
12687
+ gitlogoplus put #008000 -to 0 1 4 3
12688
+ gitlogo copy gitlogoplus -to 1 9
12689
+ gitlogo copy gitlogoplus -to 6 9
12690
+ gitlogo copy gitlogoplus -to 11 9
12691
+ image delete gitlogoplus
12692
+
12693
+ image create photo gitlogo32 -width 32 -height 32
12694
+ gitlogo32 copy gitlogo -zoom 2 2
12695
+
12696
+ wm iconphoto . -default gitlogo gitlogo32
12697
+ }
12688
12698
}
12689
12699
# wait for the window to become visible
12690
12700
tkwait visibility .
0 commit comments