Eskil

Diff
Login

Differences From Artifact [9bc1264577]:

To Artifact [e0ab3ef5e2]:


416
417
418
419
420
421
422
















423
424
425

426
427
428
429
430
431
432
433
434
435
436
437
438

439
440
441
442
443
444
445
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463







+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+



+













+







        $tree cellconfigure $row,0 -image $::img(clsd)
    }

    # Format a time stamp for display
    proc FormatDate {date} {
        clock format $date -format "%Y-%m-%d %H:%M:%S"
    }

    method busyCursor {} {
        variable oldcursor
        if {![info exists oldcursor]} {
            set oldcursor(hull) [$hull cget -cursor]
            set oldcursor(tree) [$tree cget -cursor]
        }
        $hull configure -cursor watch
        $tree configure -cursor watch
    }

    method normalCursor {} {
        variable oldcursor
        $hull configure -cursor $oldcursor(hull)
        $tree configure -cursor $oldcursor(tree)
    }

    # Remove all equal nodes from tree
    method PruneEqual {} {
        $self busyCursor
        set todo [$tree childkeys root]
        while {[llength $todo] > 0} {
            set todoNow $todo
            set todo {}
            foreach node $todoNow {
                set status [$tree rowattrib $node status]
                if {$status eq "equal"} {
                    $tree delete $node
                } else {
                    lappend todo {*}[$tree childkeys $node]
                }
            }
        }
        $self normalCursor
    }

    # Open or close all directories in the tree view
    method OpenAll {{state 1}} {
        if {$state} {
            $tree expandall
        } else {