@@ -2079,7 +2079,7 @@ proc makewindow {} {
2079
2079
global headctxmenu progresscanv progressitem progresscoords statusw
2080
2080
global fprogitem fprogcoord lastprogupdate progupdatepending
2081
2081
global rprogitem rprogcoord rownumsel numcommits
2082
- global have_tk85 use_ttk NS
2082
+ global have_tk85 have_tk86 use_ttk NS
2083
2083
global git_version
2084
2084
global worddiff
2085
2085
@@ -2577,8 +2577,13 @@ proc makewindow {} {
2577
2577
bind . <Key-Down> " selnextline 1"
2578
2578
bind . <Shift-Key-Up> " dofind -1 0"
2579
2579
bind . <Shift-Key-Down> " dofind 1 0"
2580
- bindkey <Key-Right> " goforw"
2581
- bindkey <Key-Left> " goback"
2580
+ if {$have_tk86 } {
2581
+ bindkey <<NextChar>> " goforw"
2582
+ bindkey <<PrevChar>> " goback"
2583
+ } else {
2584
+ bindkey <Key-Right> " goforw"
2585
+ bindkey <Key-Left> " goback"
2586
+ }
2582
2587
bind . <Key-Prior> " selnextpage -1"
2583
2588
bind . <Key-Next> " selnextpage 1"
2584
2589
bind . <$M1B -Home> " allcanvs yview moveto 0.0"
@@ -7689,7 +7694,7 @@ proc gettreeline {gtf id} {
7689
7694
if {[string index $fname 0] eq " \" " } {
7690
7695
set fname [lindex $fname 0]
7691
7696
}
7692
- set fname [encoding convertfrom $fname ]
7697
+ set fname [encoding convertfrom utf-8 $fname ]
7693
7698
lappend treefilelist($id ) $fname
7694
7699
}
7695
7700
if {![eof $gtf ]} {
@@ -7951,7 +7956,7 @@ proc gettreediffline {gdtf ids} {
7951
7956
if {[string index $file 0] eq " \" " } {
7952
7957
set file [lindex $file 0]
7953
7958
}
7954
- set file [encoding convertfrom $file ]
7959
+ set file [encoding convertfrom utf-8 $file ]
7955
7960
if {$file ne [lindex $treediff end]} {
7956
7961
lappend treediff $file
7957
7962
lappend sublist $file
@@ -8096,7 +8101,7 @@ proc makediffhdr {fname ids} {
8096
8101
global ctext curdiffstart treediffs diffencoding
8097
8102
global ctext_file_names jump_to_here targetline diffline
8098
8103
8099
- set fname [encoding convertfrom $fname ]
8104
+ set fname [encoding convertfrom utf-8 $fname ]
8100
8105
set diffencoding [get_path_encoding $fname ]
8101
8106
set i [lsearch -exact $treediffs($ids) $fname ]
8102
8107
if {$i >= 0} {
@@ -8158,7 +8163,7 @@ proc parseblobdiffline {ids line} {
8158
8163
8159
8164
if {![string compare -length 5 " diff " $line ]} {
8160
8165
if {![regexp {^diff (--cc|--git) } $line m type]} {
8161
- set line [encoding convertfrom $line ]
8166
+ set line [encoding convertfrom utf-8 $line ]
8162
8167
$ctext insert end " $line \n " hunksep
8163
8168
continue
8164
8169
}
@@ -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
@@ -8260,7 +8265,7 @@ proc parseblobdiffline {ids line} {
8260
8265
if {[string index $fname 0] eq " \" " } {
8261
8266
set fname [lindex $fname 0]
8262
8267
}
8263
- set fname [encoding convertfrom $fname ]
8268
+ set fname [encoding convertfrom utf-8 $fname ]
8264
8269
set i [lsearch -exact $treediffs($ids) $fname ]
8265
8270
if {$i >= 0} {
8266
8271
setinlist difffilestart $i $curdiffstart
@@ -8279,6 +8284,7 @@ proc parseblobdiffline {ids line} {
8279
8284
set diffinhdr 0
8280
8285
return
8281
8286
}
8287
+ set line [encoding convertfrom utf-8 $line ]
8282
8288
$ctext insert end " $line \n " filesep
8283
8289
8284
8290
} else {
@@ -10037,7 +10043,7 @@ proc showrefs {} {
10037
10043
text $top .list -background $bgcolor -foreground $fgcolor \
10038
10044
-selectbackground $selectbgcolor -font mainfont \
10039
10045
-xscrollcommand " $top .xsb set" -yscrollcommand " $top .ysb set" \
10040
- -width 30 -height 20 -cursor $maincursor \
10046
+ -width 60 -height 20 -cursor $maincursor \
10041
10047
-spacing1 1 -spacing3 1 -state disabled
10042
10048
$top .list tag configure highlight -background $selectbgcolor
10043
10049
if {![lsearch -exact $bglist $top .list]} {
@@ -12241,7 +12247,7 @@ proc cache_gitattr {attr pathlist} {
12241
12247
foreach row [split $rlist " \n " ] {
12242
12248
if {[regexp "(.*): $attr : (.*)" $row m path value]} {
12243
12249
if {[string index $path 0] eq " \" " } {
12244
- set path [encoding convertfrom [lindex $path 0]]
12250
+ set path [encoding convertfrom utf-8 [lindex $path 0]]
12245
12251
}
12246
12252
set path_attr_cache($attr ,$path ) $value
12247
12253
}
@@ -12271,7 +12277,6 @@ if { [info exists ::env(GITK_MSGSDIR)] } {
12271
12277
set gitk_prefix [file dirname [file dirname [file normalize $argv0 ]]]
12272
12278
set gitk_libdir [file join $gitk_prefix share gitk lib]
12273
12279
set gitk_msgsdir [file join $gitk_libdir msgs]
12274
- unset gitk_prefix
12275
12280
}
12276
12281
12277
12282
# # Internationalization (i18n) through msgcat and gettext. See
@@ -12570,6 +12575,7 @@ set nullid2 "0000000000000000000000000000000000000001"
12570
12575
set nullfile " /dev/null"
12571
12576
12572
12577
set have_tk85 [expr {[package vcompare $tk_version " 8.5" ] >= 0}]
12578
+ set have_tk86 [expr {[package vcompare $tk_version " 8.6" ] >= 0}]
12573
12579
if {![info exists have_ttk]} {
12574
12580
set have_ttk [llength [info commands ::ttk::style]]
12575
12581
}
@@ -12634,28 +12640,32 @@ if {[expr {[exec git rev-parse --is-inside-work-tree] == "true"}]} {
12634
12640
set worktree [gitworktree]
12635
12641
setcoords
12636
12642
makewindow
12637
- catch {
12638
- image create photo gitlogo -width 16 -height 16
12639
-
12640
- image create photo gitlogominus -width 4 -height 2
12641
- gitlogominus put #C00000 -to 0 0 4 2
12642
- gitlogo copy gitlogominus -to 1 5
12643
- gitlogo copy gitlogominus -to 6 5
12644
- gitlogo copy gitlogominus -to 11 5
12645
- image delete gitlogominus
12646
-
12647
- image create photo gitlogoplus -width 4 -height 4
12648
- gitlogoplus put #008000 -to 1 0 3 4
12649
- gitlogoplus put #008000 -to 0 1 4 3
12650
- gitlogo copy gitlogoplus -to 1 9
12651
- gitlogo copy gitlogoplus -to 6 9
12652
- gitlogo copy gitlogoplus -to 11 9
12653
- image delete gitlogoplus
12654
-
12655
- image create photo gitlogo32 -width 32 -height 32
12656
- gitlogo32 copy gitlogo -zoom 2 2
12657
-
12658
- wm iconphoto . -default gitlogo gitlogo32
12643
+ if {$::tcl_platform(platform) eq {windows} && [file exists $gitk_prefix /etc/git.ico]} {
12644
+ wm iconbitmap . -default $gitk_prefix /etc/git.ico
12645
+ } else {
12646
+ catch {
12647
+ image create photo gitlogo -width 16 -height 16
12648
+
12649
+ image create photo gitlogominus -width 4 -height 2
12650
+ gitlogominus put #C00000 -to 0 0 4 2
12651
+ gitlogo copy gitlogominus -to 1 5
12652
+ gitlogo copy gitlogominus -to 6 5
12653
+ gitlogo copy gitlogominus -to 11 5
12654
+ image delete gitlogominus
12655
+
12656
+ image create photo gitlogoplus -width 4 -height 4
12657
+ gitlogoplus put #008000 -to 1 0 3 4
12658
+ gitlogoplus put #008000 -to 0 1 4 3
12659
+ gitlogo copy gitlogoplus -to 1 9
12660
+ gitlogo copy gitlogoplus -to 6 9
12661
+ gitlogo copy gitlogoplus -to 11 9
12662
+ image delete gitlogoplus
12663
+
12664
+ image create photo gitlogo32 -width 32 -height 32
12665
+ gitlogo32 copy gitlogo -zoom 2 2
12666
+
12667
+ wm iconphoto . -default gitlogo gitlogo32
12668
+ }
12659
12669
}
12660
12670
# wait for the window to become visible
12661
12671
tkwait visibility .
0 commit comments