@@ -2096,7 +2096,7 @@ proc makewindow {} {
2096
2096
global headctxmenu progresscanv progressitem progresscoords statusw
2097
2097
global fprogitem fprogcoord lastprogupdate progupdatepending
2098
2098
global rprogitem rprogcoord rownumsel numcommits
2099
- global have_tk85 use_ttk NS
2099
+ global have_tk85 have_tk86 use_ttk NS
2100
2100
global git_version
2101
2101
global worddiff
2102
2102
@@ -2586,8 +2586,13 @@ proc makewindow {} {
2586
2586
bind . <Key-Down> " selnextline 1"
2587
2587
bind . <Shift-Key-Up> " dofind -1 0"
2588
2588
bind . <Shift-Key-Down> " dofind 1 0"
2589
- bindkey <Key-Right> " goforw"
2590
- bindkey <Key-Left> " goback"
2589
+ if {$have_tk86 } {
2590
+ bindkey <<NextChar>> " goforw"
2591
+ bindkey <<PrevChar>> " goback"
2592
+ } else {
2593
+ bindkey <Key-Right> " goforw"
2594
+ bindkey <Key-Left> " goback"
2595
+ }
2591
2596
bind . <Key-Prior> " selnextpage -1"
2592
2597
bind . <Key-Next> " selnextpage 1"
2593
2598
bind . <$M1B -Home> " allcanvs yview moveto 0.0"
@@ -7691,7 +7696,7 @@ proc gettreeline {gtf id} {
7691
7696
if {[string index $fname 0] eq " \" " } {
7692
7697
set fname [lindex $fname 0]
7693
7698
}
7694
- set fname [encoding convertfrom $fname ]
7699
+ set fname [encoding convertfrom utf-8 $fname ]
7695
7700
lappend treefilelist($id ) $fname
7696
7701
}
7697
7702
if {![eof $gtf ]} {
@@ -7953,7 +7958,7 @@ proc gettreediffline {gdtf ids} {
7953
7958
if {[string index $file 0] eq " \" " } {
7954
7959
set file [lindex $file 0]
7955
7960
}
7956
- set file [encoding convertfrom $file ]
7961
+ set file [encoding convertfrom utf-8 $file ]
7957
7962
if {$file ne [lindex $treediff end]} {
7958
7963
lappend treediff $file
7959
7964
lappend sublist $file
@@ -8098,7 +8103,7 @@ proc makediffhdr {fname ids} {
8098
8103
global ctext curdiffstart treediffs diffencoding
8099
8104
global ctext_file_names jump_to_here targetline diffline
8100
8105
8101
- set fname [encoding convertfrom $fname ]
8106
+ set fname [encoding convertfrom utf-8 $fname ]
8102
8107
set diffencoding [get_path_encoding $fname ]
8103
8108
set i [lsearch -exact $treediffs($ids) $fname ]
8104
8109
if {$i >= 0} {
@@ -8160,7 +8165,7 @@ proc parseblobdiffline {ids line} {
8160
8165
8161
8166
if {![string compare -length 5 " diff " $line ]} {
8162
8167
if {![regexp {^diff (--cc|--git) } $line m type]} {
8163
- set line [encoding convertfrom $line ]
8168
+ set line [encoding convertfrom utf-8 $line ]
8164
8169
$ctext insert end " $line \n " hunksep
8165
8170
continue
8166
8171
}
@@ -8207,7 +8212,7 @@ proc parseblobdiffline {ids line} {
8207
8212
makediffhdr $fname $ids
8208
8213
8209
8214
} elseif {![string compare -length 16 " * Unmerged path " $line ]} {
8210
- set fname [encoding convertfrom [string range $line 16 end]]
8215
+ set fname [encoding convertfrom utf-8 [string range $line 16 end]]
8211
8216
$ctext insert end " \n "
8212
8217
set curdiffstart [$ctext index " end - 1c" ]
8213
8218
lappend ctext_file_names $fname
@@ -8262,7 +8267,7 @@ proc parseblobdiffline {ids line} {
8262
8267
if {[string index $fname 0] eq " \" " } {
8263
8268
set fname [lindex $fname 0]
8264
8269
}
8265
- set fname [encoding convertfrom $fname ]
8270
+ set fname [encoding convertfrom utf-8 $fname ]
8266
8271
set i [lsearch -exact $treediffs($ids) $fname ]
8267
8272
if {$i >= 0} {
8268
8273
setinlist difffilestart $i $curdiffstart
@@ -8281,6 +8286,7 @@ proc parseblobdiffline {ids line} {
8281
8286
set diffinhdr 0
8282
8287
return
8283
8288
}
8289
+ set line [encoding convertfrom utf-8 $line ]
8284
8290
$ctext insert end " $line \n " filesep
8285
8291
8286
8292
} else {
@@ -10039,7 +10045,7 @@ proc showrefs {} {
10039
10045
text $top .list -background $bgcolor -foreground $fgcolor \
10040
10046
-selectbackground $selectbgcolor -font mainfont \
10041
10047
-xscrollcommand " $top .xsb set" -yscrollcommand " $top .ysb set" \
10042
- -width 30 -height 20 -cursor $maincursor \
10048
+ -width 60 -height 20 -cursor $maincursor \
10043
10049
-spacing1 1 -spacing3 1 -state disabled
10044
10050
$top .list tag configure highlight -background $selectbgcolor
10045
10051
if {![lsearch -exact $bglist $top .list]} {
@@ -12236,7 +12242,7 @@ proc cache_gitattr {attr pathlist} {
12236
12242
foreach row [split $rlist " \n " ] {
12237
12243
if {[regexp "(.*): $attr : (.*)" $row m path value]} {
12238
12244
if {[string index $path 0] eq " \" " } {
12239
- set path [encoding convertfrom [lindex $path 0]]
12245
+ set path [encoding convertfrom utf-8 [lindex $path 0]]
12240
12246
}
12241
12247
set path_attr_cache($attr ,$path ) $value
12242
12248
}
@@ -12266,7 +12272,6 @@ if { [info exists ::env(GITK_MSGSDIR)] } {
12266
12272
set gitk_prefix [file dirname [file dirname [file normalize $argv0 ]]]
12267
12273
set gitk_libdir [file join $gitk_prefix share gitk lib]
12268
12274
set gitk_msgsdir [file join $gitk_libdir msgs]
12269
- unset gitk_prefix
12270
12275
}
12271
12276
12272
12277
# # Internationalization (i18n) through msgcat and gettext. See
@@ -12564,6 +12569,7 @@ set nullid2 "0000000000000000000000000000000000000001"
12564
12569
set nullfile " /dev/null"
12565
12570
12566
12571
set have_tk85 [expr {[package vcompare $tk_version " 8.5" ] >= 0}]
12572
+ set have_tk86 [expr {[package vcompare $tk_version " 8.6" ] >= 0}]
12567
12573
if {![info exists have_ttk]} {
12568
12574
set have_ttk [llength [info commands ::ttk::style]]
12569
12575
}
@@ -12630,28 +12636,32 @@ if {$hasworktree} {
12630
12636
}
12631
12637
setcoords
12632
12638
makewindow
12633
- catch {
12634
- image create photo gitlogo -width 16 -height 16
12635
-
12636
- image create photo gitlogominus -width 4 -height 2
12637
- gitlogominus put #C00000 -to 0 0 4 2
12638
- gitlogo copy gitlogominus -to 1 5
12639
- gitlogo copy gitlogominus -to 6 5
12640
- gitlogo copy gitlogominus -to 11 5
12641
- image delete gitlogominus
12642
-
12643
- image create photo gitlogoplus -width 4 -height 4
12644
- gitlogoplus put #008000 -to 1 0 3 4
12645
- gitlogoplus put #008000 -to 0 1 4 3
12646
- gitlogo copy gitlogoplus -to 1 9
12647
- gitlogo copy gitlogoplus -to 6 9
12648
- gitlogo copy gitlogoplus -to 11 9
12649
- image delete gitlogoplus
12650
-
12651
- image create photo gitlogo32 -width 32 -height 32
12652
- gitlogo32 copy gitlogo -zoom 2 2
12653
-
12654
- wm iconphoto . -default gitlogo gitlogo32
12639
+ if {$::tcl_platform(platform) eq {windows} && [file exists $gitk_prefix /etc/git.ico]} {
12640
+ wm iconbitmap . -default $gitk_prefix /etc/git.ico
12641
+ } else {
12642
+ catch {
12643
+ image create photo gitlogo -width 16 -height 16
12644
+
12645
+ image create photo gitlogominus -width 4 -height 2
12646
+ gitlogominus put #C00000 -to 0 0 4 2
12647
+ gitlogo copy gitlogominus -to 1 5
12648
+ gitlogo copy gitlogominus -to 6 5
12649
+ gitlogo copy gitlogominus -to 11 5
12650
+ image delete gitlogominus
12651
+
12652
+ image create photo gitlogoplus -width 4 -height 4
12653
+ gitlogoplus put #008000 -to 1 0 3 4
12654
+ gitlogoplus put #008000 -to 0 1 4 3
12655
+ gitlogo copy gitlogoplus -to 1 9
12656
+ gitlogo copy gitlogoplus -to 6 9
12657
+ gitlogo copy gitlogoplus -to 11 9
12658
+ image delete gitlogoplus
12659
+
12660
+ image create photo gitlogo32 -width 32 -height 32
12661
+ gitlogo32 copy gitlogo -zoom 2 2
12662
+
12663
+ wm iconphoto . -default gitlogo gitlogo32
12664
+ }
12655
12665
}
12656
12666
# wait for the window to become visible
12657
12667
tkwait visibility .
0 commit comments