Skip to content

Commit c82f323

Browse files
author
jan.nijtmans
committed
Merge trunk
2 parents 109cf2f + 5aa860f commit c82f323

File tree

4 files changed

+19
-20
lines changed

4 files changed

+19
-20
lines changed

.github/workflows/linux-build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,15 +111,15 @@ jobs:
111111
echo "VERSION=`ls -d tk* | sed 's/tk//'`" >> $GITHUB_ENV
112112
- name: Upload Source Distribution
113113
if: ${{ env.BUILD_CONFIG_ID == 'gcc' }}
114-
uses: actions/upload-artifact@v5
114+
uses: actions/upload-artifact@v7
115115
with:
116116
name: Tk ${{ env.VERSION }} Source distribution (snapshot)
117117
path: |
118118
/tmp/dist/tk*
119119
!/tmp/dist/tk*/html/**
120120
- name: Upload Documentation Distribution
121121
if: ${{ env.BUILD_CONFIG_ID == 'gcc' }}
122-
uses: actions/upload-artifact@v5
122+
uses: actions/upload-artifact@v7
123123
with:
124124
name: Tk ${{ env.VERSION }} HTML documentation (snapshot)
125125
path: /tmp/dist/tk*/html

.github/workflows/onefiledist.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ jobs:
6565
env:
6666
BUILD_NAME: wish${{ env.TCL_PATCHLEVEL }}_snapshot
6767
- name: Upload
68-
uses: actions/upload-artifact@v5
68+
uses: actions/upload-artifact@v7
6969
with:
7070
name: Wish ${{ env.TCL_PATCHLEVEL }} Linux single-file build (snapshot)
7171
path: ${{ env.INST_DIR }}/*.tar
@@ -156,7 +156,7 @@ jobs:
156156
env:
157157
BUILD_NAME: wish${{ env.TCL_PATCHLEVEL }}_snapshot
158158
- name: Upload
159-
uses: actions/upload-artifact@v5
159+
uses: actions/upload-artifact@v7
160160
with:
161161
name: Wish ${{ env.TCL_PATCHLEVEL }} macOS single-file build (snapshot)
162162
path: ${{ env.INST_DIR }}/*.dmg
@@ -219,7 +219,7 @@ jobs:
219219
env:
220220
BUILD_NAME: wish${{ env.TCL_PATCHLEVEL }}_snapshot
221221
- name: Upload
222-
uses: actions/upload-artifact@v5
222+
uses: actions/upload-artifact@v7
223223
with:
224224
name: Wish ${{ env.TCL_PATCHLEVEL }} Windows single-file build (snapshot)
225225
path: install/combined/wish${{ env.TCL_PATCHLEVEL }}_snapshot.exe

library/demos/mclist.tcl

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,14 @@ grid row $w.container 0 -weight 1
4040
set upArrowData {
4141
<?xml version="1.0" encoding="UTF-8"?>
4242
<svg width="16" height="4" version="1.1" xmlns="http://www.w3.org/2000/svg">
43-
<path d="m4 4 4-4 4 4z" fill="#000000"/>
43+
<path d="m4 4 4-4 4 4z" fill="%s"/>
4444
</svg>
4545
}
4646

4747
set downArrowData {
4848
<?xml version="1.0" encoding="UTF-8"?>
4949
<svg width="16" height="4" version="1.1" xmlns="http://www.w3.org/2000/svg">
50-
<path d="m4 0 4 4 4-4z" fill="#000000"/>
50+
<path d="m4 0 4 4 4-4z" fill="%s"/>
5151
</svg>
5252
}
5353

@@ -59,10 +59,7 @@ proc createArrowImages {} {
5959

6060
foreach dir {up down} {
6161
upvar ${dir}ArrowData imgData
62-
set idx1 [string first "#000000" $imgData]
63-
set idx2 [expr {$idx1 + 6}]
64-
set data [string replace $imgData $idx1 $idx2 $fgColor]
65-
62+
set data [format $imgData $fgColor]
6663
image create photo ${dir}Arrow -format $::tk::svgFmt -data $data]
6764
}
6865
}
@@ -103,7 +100,7 @@ set font [ttk::style lookup Heading -font {} TkDefaultFont]
103100
set morePx [expr {[image width noArrow] + round(4 * $tk::scalingPct / 100.0)}]
104101
foreach col {country capital currency} name {Country Capital Currency} {
105102
$w.tree heading $col -text $name -image noArrow -anchor w \
106-
-command [list SortBy $w.tree $col 0]
103+
-command [list SortBy $w.tree $col 1]
107104
$w.tree column $col -width [expr {[font measure $font $name] + $morePx}]
108105
}
109106
set font [ttk::style lookup Treeview -font {} TkDefaultFont]
@@ -135,7 +132,7 @@ proc SortBy {tree col direction} {
135132
lappend data [list [$tree set $row $col] $row]
136133
}
137134

138-
set dir [expr {$direction ? "-decreasing" : "-increasing"}]
135+
set dir [expr {$direction ? "-increasing" : "-decreasing"}]
139136
set r -1
140137

141138
# Now reshuffle the rows into the sorted order

library/demos/tree.tcl

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ pack [addSeeDismiss $w.seeDismiss $w] -side bottom -fill x
2626
## Code to populate the roots of the tree (can be more than one on Windows)
2727
proc populateRoots {tree} {
2828
foreach dir [lsort -dictionary [file volumes]] {
29-
populateTree $tree [$tree insert {} end -text $dir \
30-
-image [tk fileicon [file normalize $dir] 16] \
31-
-values [list $dir directory]]
29+
populateTree $tree [$tree insert {} end -text $dir \
30+
-image [tk fileicon [file normalize $dir] 16] \
31+
-values [list $dir directory]]
3232
}
3333
}
3434

@@ -43,12 +43,14 @@ proc populateTree {tree node} {
4343
set f [file normalize $f]
4444
set type [file type $f]
4545
set id [$tree insert $node end -text [file tail $f] \
46-
-image [tk fileicon $f 16]\
47-
-values [list $f $type]]
46+
-image [tk fileicon $f 16] \
47+
-values [list $f $type]]
4848

4949
if {$type eq "directory"} {
50-
## Make it so that this node is openable
51-
$tree insert $id 0 -text dummy ;# a dummy
50+
if {[file readable $f]} {
51+
## Make it so that this node is openable
52+
$tree insert $id 0 -text dummy ;# a dummy
53+
}
5254
$tree item $id -text [file tail $f]/
5355

5456
} elseif {$type eq "file"} {

0 commit comments

Comments
 (0)