@@ -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"
@@ -7692,7 +7697,7 @@ proc gettreeline {gtf id} {
7692
7697
if {[string index $fname 0] eq " \" " } {
7693
7698
set fname [lindex $fname 0]
7694
7699
}
7695
- set fname [encoding convertfrom $fname ]
7700
+ set fname [encoding convertfrom utf-8 $fname ]
7696
7701
lappend treefilelist($id ) $fname
7697
7702
}
7698
7703
if {![eof $gtf ]} {
@@ -7954,7 +7959,7 @@ proc gettreediffline {gdtf ids} {
7954
7959
if {[string index $file 0] eq " \" " } {
7955
7960
set file [lindex $file 0]
7956
7961
}
7957
- set file [encoding convertfrom $file ]
7962
+ set file [encoding convertfrom utf-8 $file ]
7958
7963
if {$file ne [lindex $treediff end]} {
7959
7964
lappend treediff $file
7960
7965
lappend sublist $file
@@ -8099,7 +8104,7 @@ proc makediffhdr {fname ids} {
8099
8104
global ctext curdiffstart treediffs diffencoding
8100
8105
global ctext_file_names jump_to_here targetline diffline
8101
8106
8102
- set fname [encoding convertfrom $fname ]
8107
+ set fname [encoding convertfrom utf-8 $fname ]
8103
8108
set diffencoding [get_path_encoding $fname ]
8104
8109
set i [lsearch -exact $treediffs($ids) $fname ]
8105
8110
if {$i >= 0} {
@@ -8161,7 +8166,7 @@ proc parseblobdiffline {ids line} {
8161
8166
8162
8167
if {![string compare -length 5 " diff " $line ]} {
8163
8168
if {![regexp {^diff (--cc|--git) } $line m type]} {
8164
- set line [encoding convertfrom $line ]
8169
+ set line [encoding convertfrom utf-8 $line ]
8165
8170
$ctext insert end " $line \n " hunksep
8166
8171
continue
8167
8172
}
@@ -8210,7 +8215,7 @@ proc parseblobdiffline {ids line} {
8210
8215
makediffhdr $fname $ids
8211
8216
8212
8217
} elseif {![string compare -length 16 " * Unmerged path " $line ]} {
8213
- set fname [encoding convertfrom [string range $line 16 end]]
8218
+ set fname [encoding convertfrom utf-8 [string range $line 16 end]]
8214
8219
$ctext insert end " \n "
8215
8220
set curdiffstart [$ctext index " end - 1c" ]
8216
8221
lappend ctext_file_names $fname
@@ -8263,7 +8268,7 @@ proc parseblobdiffline {ids line} {
8263
8268
if {[string index $fname 0] eq " \" " } {
8264
8269
set fname [lindex $fname 0]
8265
8270
}
8266
- set fname [encoding convertfrom $fname ]
8271
+ set fname [encoding convertfrom utf-8 $fname ]
8267
8272
set i [lsearch -exact $treediffs($ids) $fname ]
8268
8273
if {$i >= 0} {
8269
8274
setinlist difffilestart $i $curdiffstart
@@ -8282,6 +8287,7 @@ proc parseblobdiffline {ids line} {
8282
8287
set diffinhdr 0
8283
8288
return
8284
8289
}
8290
+ set line [encoding convertfrom utf-8 $line ]
8285
8291
$ctext insert end " $line \n " filesep
8286
8292
8287
8293
} else {
@@ -10040,7 +10046,7 @@ proc showrefs {} {
10040
10046
text $top .list -background $bgcolor -foreground $fgcolor \
10041
10047
-selectbackground $selectbgcolor -font mainfont \
10042
10048
-xscrollcommand " $top .xsb set" -yscrollcommand " $top .ysb set" \
10043
- -width 30 -height 20 -cursor $maincursor \
10049
+ -width 60 -height 20 -cursor $maincursor \
10044
10050
-spacing1 1 -spacing3 1 -state disabled
10045
10051
$top .list tag configure highlight -background $selectbgcolor
10046
10052
if {![lsearch -exact $bglist $top .list]} {
@@ -12244,7 +12250,7 @@ proc cache_gitattr {attr pathlist} {
12244
12250
foreach row [split $rlist " \n " ] {
12245
12251
if {[regexp "(.*): $attr : (.*)" $row m path value]} {
12246
12252
if {[string index $path 0] eq " \" " } {
12247
- set path [encoding convertfrom [lindex $path 0]]
12253
+ set path [encoding convertfrom utf-8 [lindex $path 0]]
12248
12254
}
12249
12255
set path_attr_cache($attr ,$path ) $value
12250
12256
}
@@ -12274,7 +12280,6 @@ if { [info exists ::env(GITK_MSGSDIR)] } {
12274
12280
set gitk_prefix [file dirname [file dirname [file normalize $argv0 ]]]
12275
12281
set gitk_libdir [file join $gitk_prefix share gitk lib]
12276
12282
set gitk_msgsdir [file join $gitk_libdir msgs]
12277
- unset gitk_prefix
12278
12283
}
12279
12284
12280
12285
# # Internationalization (i18n) through msgcat and gettext. See
@@ -12573,6 +12578,7 @@ set nullid2 "0000000000000000000000000000000000000001"
12573
12578
set nullfile " /dev/null"
12574
12579
12575
12580
set have_tk85 [expr {[package vcompare $tk_version " 8.5" ] >= 0}]
12581
+ set have_tk86 [expr {[package vcompare $tk_version " 8.6" ] >= 0}]
12576
12582
if {![info exists have_ttk]} {
12577
12583
set have_ttk [llength [info commands ::ttk::style]]
12578
12584
}
@@ -12637,28 +12643,32 @@ if {[expr {[exec git rev-parse --is-inside-work-tree] == "true"}]} {
12637
12643
set worktree [gitworktree]
12638
12644
setcoords
12639
12645
makewindow
12640
- catch {
12641
- image create photo gitlogo -width 16 -height 16
12642
-
12643
- image create photo gitlogominus -width 4 -height 2
12644
- gitlogominus put #C00000 -to 0 0 4 2
12645
- gitlogo copy gitlogominus -to 1 5
12646
- gitlogo copy gitlogominus -to 6 5
12647
- gitlogo copy gitlogominus -to 11 5
12648
- image delete gitlogominus
12649
-
12650
- image create photo gitlogoplus -width 4 -height 4
12651
- gitlogoplus put #008000 -to 1 0 3 4
12652
- gitlogoplus put #008000 -to 0 1 4 3
12653
- gitlogo copy gitlogoplus -to 1 9
12654
- gitlogo copy gitlogoplus -to 6 9
12655
- gitlogo copy gitlogoplus -to 11 9
12656
- image delete gitlogoplus
12657
-
12658
- image create photo gitlogo32 -width 32 -height 32
12659
- gitlogo32 copy gitlogo -zoom 2 2
12660
-
12661
- wm iconphoto . -default gitlogo gitlogo32
12646
+ if {$::tcl_platform(platform) eq {windows} && [file exists $gitk_prefix /etc/git.ico]} {
12647
+ wm iconbitmap . -default $gitk_prefix /etc/git.ico
12648
+ } else {
12649
+ catch {
12650
+ image create photo gitlogo -width 16 -height 16
12651
+
12652
+ image create photo gitlogominus -width 4 -height 2
12653
+ gitlogominus put #C00000 -to 0 0 4 2
12654
+ gitlogo copy gitlogominus -to 1 5
12655
+ gitlogo copy gitlogominus -to 6 5
12656
+ gitlogo copy gitlogominus -to 11 5
12657
+ image delete gitlogominus
12658
+
12659
+ image create photo gitlogoplus -width 4 -height 4
12660
+ gitlogoplus put #008000 -to 1 0 3 4
12661
+ gitlogoplus put #008000 -to 0 1 4 3
12662
+ gitlogo copy gitlogoplus -to 1 9
12663
+ gitlogo copy gitlogoplus -to 6 9
12664
+ gitlogo copy gitlogoplus -to 11 9
12665
+ image delete gitlogoplus
12666
+
12667
+ image create photo gitlogo32 -width 32 -height 32
12668
+ gitlogo32 copy gitlogo -zoom 2 2
12669
+
12670
+ wm iconphoto . -default gitlogo gitlogo32
12671
+ }
12662
12672
}
12663
12673
# wait for the window to become visible
12664
12674
tkwait visibility .
0 commit comments