Eskil

Diff
Login

Differences From Artifact [30d673aca1]:

To Artifact [f641abdfeb]:


563
564
565
566
567
568
569



















570
571
572
573
574
575
576
                        lappend todo {*}$children
                    }
                }
            }
        }
        $self normalCursor
    }




















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







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
                        lappend todo {*}$children
                    }
                }
            }
        }
        $self normalCursor
    }

    # Remove all nodes that are just on one side
    method PruneAlone {} {
       $self busyCursor
        set todo [$tree childkeys root]
        while {[llength $todo] > 0} {
            set todoNow $todo
            set todo {}
            foreach node $todoNow {
                set status $NodeStatus($node)
                if {$status in {new old}} {
                    $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 {
            $tree collapseall
732
733
734
735
736
737
738

739
740
741
742
743
744
745
        set m $win.popup
        destroy $m
        menu $m

        if {$colname eq "structure"} {
            $m add command -label "Prune equal" -command [mymethod PruneEqual]
            $m add command -label "Prune empty" -command [mymethod PruneEmpty]

            $m add command -label "Expand all" -command [mymethod OpenAll]
            $m add command -label "Collapse all" -command [mymethod OpenAll 0]
        }

        if {$type eq "file" && $lf ne "" && $rf ne ""} {
            # Files, both exist
            $m add command -label "Compare Files" -command [list \







>







751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
        set m $win.popup
        destroy $m
        menu $m

        if {$colname eq "structure"} {
            $m add command -label "Prune equal" -command [mymethod PruneEqual]
            $m add command -label "Prune empty" -command [mymethod PruneEmpty]
            $m add command -label "Prune alone" -command [mymethod PruneAlone]
            $m add command -label "Expand all" -command [mymethod OpenAll]
            $m add command -label "Collapse all" -command [mymethod OpenAll 0]
        }

        if {$type eq "file" && $lf ne "" && $rf ne ""} {
            # Files, both exist
            $m add command -label "Compare Files" -command [list \