@@ -2076,7 +2076,7 @@ proc makewindow {} {
2076
2076
global headctxmenu progresscanv progressitem progresscoords statusw
2077
2077
global fprogitem fprogcoord lastprogupdate progupdatepending
2078
2078
global rprogitem rprogcoord rownumsel numcommits
2079
- global have_tk85 use_ttk NS
2079
+ global have_tk85 have_tk86 use_ttk NS
2080
2080
global git_version
2081
2081
global worddiff
2082
2082
@@ -2566,8 +2566,13 @@ proc makewindow {} {
2566
2566
bind . <Key-Down> " selnextline 1"
2567
2567
bind . <Shift-Key-Up> " dofind -1 0"
2568
2568
bind . <Shift-Key-Down> " dofind 1 0"
2569
- bindkey <Key-Right> " goforw"
2570
- bindkey <Key-Left> " goback"
2569
+ if {$have_tk86 } {
2570
+ bindkey <<NextChar>> " goforw"
2571
+ bindkey <<PrevChar>> " goback"
2572
+ } else {
2573
+ bindkey <Key-Right> " goforw"
2574
+ bindkey <Key-Left> " goback"
2575
+ }
2571
2576
bind . <Key-Prior> " selnextpage -1"
2572
2577
bind . <Key-Next> " selnextpage 1"
2573
2578
bind . <$M1B -Home> " allcanvs yview moveto 0.0"
@@ -7671,7 +7676,7 @@ proc gettreeline {gtf id} {
7671
7676
if {[string index $fname 0] eq " \" " } {
7672
7677
set fname [lindex $fname 0]
7673
7678
}
7674
- set fname [encoding convertfrom $fname ]
7679
+ set fname [encoding convertfrom utf-8 $fname ]
7675
7680
lappend treefilelist($id ) $fname
7676
7681
}
7677
7682
if {![eof $gtf ]} {
@@ -7933,7 +7938,7 @@ proc gettreediffline {gdtf ids} {
7933
7938
if {[string index $file 0] eq " \" " } {
7934
7939
set file [lindex $file 0]
7935
7940
}
7936
- set file [encoding convertfrom $file ]
7941
+ set file [encoding convertfrom utf-8 $file ]
7937
7942
if {$file ne [lindex $treediff end]} {
7938
7943
lappend treediff $file
7939
7944
lappend sublist $file
@@ -8078,7 +8083,7 @@ proc makediffhdr {fname ids} {
8078
8083
global ctext curdiffstart treediffs diffencoding
8079
8084
global ctext_file_names jump_to_here targetline diffline
8080
8085
8081
- set fname [encoding convertfrom $fname ]
8086
+ set fname [encoding convertfrom utf-8 $fname ]
8082
8087
set diffencoding [get_path_encoding $fname ]
8083
8088
set i [lsearch -exact $treediffs($ids) $fname ]
8084
8089
if {$i >= 0} {
@@ -8140,7 +8145,7 @@ proc parseblobdiffline {ids line} {
8140
8145
8141
8146
if {![string compare -length 5 " diff " $line ]} {
8142
8147
if {![regexp {^diff (--cc|--git) } $line m type]} {
8143
- set line [encoding convertfrom $line ]
8148
+ set line [encoding convertfrom utf-8 $line ]
8144
8149
$ctext insert end " $line \n " hunksep
8145
8150
continue
8146
8151
}
@@ -8187,7 +8192,7 @@ proc parseblobdiffline {ids line} {
8187
8192
makediffhdr $fname $ids
8188
8193
8189
8194
} elseif {![string compare -length 16 " * Unmerged path " $line ]} {
8190
- set fname [encoding convertfrom [string range $line 16 end]]
8195
+ set fname [encoding convertfrom utf-8 [string range $line 16 end]]
8191
8196
$ctext insert end " \n "
8192
8197
set curdiffstart [$ctext index " end - 1c" ]
8193
8198
lappend ctext_file_names $fname
@@ -8242,7 +8247,7 @@ proc parseblobdiffline {ids line} {
8242
8247
if {[string index $fname 0] eq " \" " } {
8243
8248
set fname [lindex $fname 0]
8244
8249
}
8245
- set fname [encoding convertfrom $fname ]
8250
+ set fname [encoding convertfrom utf-8 $fname ]
8246
8251
set i [lsearch -exact $treediffs($ids) $fname ]
8247
8252
if {$i >= 0} {
8248
8253
setinlist difffilestart $i $curdiffstart
@@ -8261,6 +8266,7 @@ proc parseblobdiffline {ids line} {
8261
8266
set diffinhdr 0
8262
8267
return
8263
8268
}
8269
+ set line [encoding convertfrom utf-8 $line ]
8264
8270
$ctext insert end " $line \n " filesep
8265
8271
8266
8272
} else {
@@ -10019,7 +10025,7 @@ proc showrefs {} {
10019
10025
text $top .list -background $bgcolor -foreground $fgcolor \
10020
10026
-selectbackground $selectbgcolor -font mainfont \
10021
10027
-xscrollcommand " $top .xsb set" -yscrollcommand " $top .ysb set" \
10022
- -width 30 -height 20 -cursor $maincursor \
10028
+ -width 60 -height 20 -cursor $maincursor \
10023
10029
-spacing1 1 -spacing3 1 -state disabled
10024
10030
$top .list tag configure highlight -background $selectbgcolor
10025
10031
if {![lsearch -exact $bglist $top .list]} {
@@ -12210,7 +12216,7 @@ proc cache_gitattr {attr pathlist} {
12210
12216
foreach row [split $rlist " \n " ] {
12211
12217
if {[regexp "(.*): $attr : (.*)" $row m path value]} {
12212
12218
if {[string index $path 0] eq " \" " } {
12213
- set path [encoding convertfrom [lindex $path 0]]
12219
+ set path [encoding convertfrom utf-8 [lindex $path 0]]
12214
12220
}
12215
12221
set path_attr_cache($attr ,$path ) $value
12216
12222
}
@@ -12240,7 +12246,6 @@ if { [info exists ::env(GITK_MSGSDIR)] } {
12240
12246
set gitk_prefix [file dirname [file dirname [file normalize $argv0 ]]]
12241
12247
set gitk_libdir [file join $gitk_prefix share gitk lib]
12242
12248
set gitk_msgsdir [file join $gitk_libdir msgs]
12243
- unset gitk_prefix
12244
12249
}
12245
12250
12246
12251
# # Internationalization (i18n) through msgcat and gettext. See
@@ -12538,6 +12543,7 @@ set nullid2 "0000000000000000000000000000000000000001"
12538
12543
set nullfile " /dev/null"
12539
12544
12540
12545
set have_tk85 [expr {[package vcompare $tk_version " 8.5" ] >= 0}]
12546
+ set have_tk86 [expr {[package vcompare $tk_version " 8.6" ] >= 0}]
12541
12547
if {![info exists have_ttk]} {
12542
12548
set have_ttk [llength [info commands ::ttk::style]]
12543
12549
}
@@ -12602,28 +12608,32 @@ if {[expr {[exec git rev-parse --is-inside-work-tree] == "true"}]} {
12602
12608
set worktree [exec git rev-parse --show-toplevel]
12603
12609
setcoords
12604
12610
makewindow
12605
- catch {
12606
- image create photo gitlogo -width 16 -height 16
12607
-
12608
- image create photo gitlogominus -width 4 -height 2
12609
- gitlogominus put #C00000 -to 0 0 4 2
12610
- gitlogo copy gitlogominus -to 1 5
12611
- gitlogo copy gitlogominus -to 6 5
12612
- gitlogo copy gitlogominus -to 11 5
12613
- image delete gitlogominus
12614
-
12615
- image create photo gitlogoplus -width 4 -height 4
12616
- gitlogoplus put #008000 -to 1 0 3 4
12617
- gitlogoplus put #008000 -to 0 1 4 3
12618
- gitlogo copy gitlogoplus -to 1 9
12619
- gitlogo copy gitlogoplus -to 6 9
12620
- gitlogo copy gitlogoplus -to 11 9
12621
- image delete gitlogoplus
12622
-
12623
- image create photo gitlogo32 -width 32 -height 32
12624
- gitlogo32 copy gitlogo -zoom 2 2
12625
-
12626
- wm iconphoto . -default gitlogo gitlogo32
12611
+ if {$::tcl_platform(platform) eq {windows} && [file exists $gitk_prefix /etc/git.ico]} {
12612
+ wm iconbitmap . -default $gitk_prefix /etc/git.ico
12613
+ } else {
12614
+ catch {
12615
+ image create photo gitlogo -width 16 -height 16
12616
+
12617
+ image create photo gitlogominus -width 4 -height 2
12618
+ gitlogominus put #C00000 -to 0 0 4 2
12619
+ gitlogo copy gitlogominus -to 1 5
12620
+ gitlogo copy gitlogominus -to 6 5
12621
+ gitlogo copy gitlogominus -to 11 5
12622
+ image delete gitlogominus
12623
+
12624
+ image create photo gitlogoplus -width 4 -height 4
12625
+ gitlogoplus put #008000 -to 1 0 3 4
12626
+ gitlogoplus put #008000 -to 0 1 4 3
12627
+ gitlogo copy gitlogoplus -to 1 9
12628
+ gitlogo copy gitlogoplus -to 6 9
12629
+ gitlogo copy gitlogoplus -to 11 9
12630
+ image delete gitlogoplus
12631
+
12632
+ image create photo gitlogo32 -width 32 -height 32
12633
+ gitlogo32 copy gitlogo -zoom 2 2
12634
+
12635
+ wm iconphoto . -default gitlogo gitlogo32
12636
+ }
12627
12637
}
12628
12638
# wait for the window to become visible
12629
12639
tkwait visibility .
0 commit comments