︙ | | |
307
308
309
310
311
312
313
314
315
316
317
318
319
320
|
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
|
+
+
|
component vsb
option -leftdirvariable -default "" -configuremethod SetDirOption
option -rightdirvariable -default "" -configuremethod SetDirOption
option -statusvar -default ""
option -changelist -default ""
option -norun -default 0
# TODO: better name for experimental parameter
option -bepa -default 0
variable AfterId ""
variable DebugCh ""
variable DebugTime {}
variable PauseBgProcessing 0
variable ScheduledRestart 0
variable AfterTime 1
|
︙ | | |
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
|
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
|
+
+
+
+
+
+
+
+
+
+
|
return
}
$tree delete [$tree childkeys $node]
set leftfull [$tree rowattrib $node leftfull]
set rightfull [$tree rowattrib $node rightfull]
#$self Dlog "UpdateDirNode $leftfull"
if {$options(-bepa)} {
if {$leftfull eq ""} {
$self SetNodeStatus $node new
return
}
if {$rightfull eq ""} {
$self SetNodeStatus $node old
return
}
}
$self CompareDirs $leftfull $rightfull $node
}
method UpdateFileNode {node} {
set leftfull [$tree rowattrib $node leftfull]
set rightfull [$tree rowattrib $node rightfull]
#$self Dlog "UpdateFileNode $leftfull"
|
︙ | | |
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
|
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
|
+
+
-
+
-
+
|
}
snit::widget DirDiff {
hulltype toplevel
widgetclass Toplevel
component tree
variable statusVar
delegate option -norun to tree
delegate option -bepa to tree
constructor {{noautodiff 0}} {
constructor {args} {
eskilRegisterToplevel $win
wm title $win "Eskil Dir"
wm protocol $win WM_DELETE_WINDOW [list cleanupAndExit $win]
install tree using DirCompareTree $win.dc \
-leftdirvariable ::dirdiff(leftDir) \
-rightdirvariable ::dirdiff(rightDir) \
-norun $noautodiff \
-statusvar [myvar statusVar]
$self configurelist $args
if {[info exists ::dirdiff(localChanges)]} {
$tree configure -changelist $::dirdiff(localChanges)
}
ttk::frame $win.fe1
ttk::frame $win.fe2
|
︙ | | |
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
|
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
|
+
-
+
|
set ::dirdiff(rightDir) $d2
}
destroy .dirdiffX
}
}
destroy .dirdiff
# TODO: better name for experimental parameter, propagate to cmd line
DirDiff .dirdiff $noautodiff
DirDiff .dirdiff -norun $noautodiff -bepa 1
return .dirdiff
}
|