35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
-
+
|
# Stop Tk from meddling with the command line by copying it first.
set ::eskil(argv) $::argv
set ::eskil(argc) $::argc
set ::argv {}
set ::argc 0
set debug 0
set diffver "Version 2.4b3 2008-05-23"
set diffver "Version 2.4b3 2008-09-23"
set ::thisScript [file join [pwd] [info script]]
# Do initalisations for needed packages and globals.
# This is not run until needed to speed up command line error reporting.
proc Init {} {
package require Tk 8.4
catch {package require textSearch}
|
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
|
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
|
+
+
+
+
|
ttk::label $top.lr2 -text "Rev 2"
addBalloon $top.lr2 "Revision number for CVS/RCS/ClearCase diff."
ttk::entryX $top.er2 -width 12 -textvariable diff($top,doptrev2)
set ::widgets($top,rev2) $top.er2
ttk::button $top.bcm -text Commit -command [list revCommit $top] \
-state disabled -underline 0
set ::widgets($top,commit) $top.bcm
ttk::button $top.blg -text Log -command [list revLog $top] \
-state disabled -underline 0
set ::widgets($top,log) $top.blg
ttk::button $top.bfp -text "Prev Diff" \
-command [list findDiff $top -1] \
-underline 0
ttk::button $top.bfn -text "Next Diff" \
-command [list findDiff $top 1] \
-underline 0
bind $top <Alt-n> [list findDiff $top 1]
bind $top <Alt-p> [list findDiff $top -1]
bind $top <Alt-c> [list revCommit $top]
bind $top <Alt-l> [list revLog $top]
catch {font delete myfont}
font create myfont -family $Pref(fontfamily) -size $Pref(fontsize)
fileLabel $top.l1 -textvariable diff($top,leftLabel)
fileLabel $top.l2 -textvariable diff($top,rightLabel)
|
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
|
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
|
-
+
|
bind $top <Key-Next> [list scrollText $top 1 pa]
bind $top <Key-Escape> [list focus $top]
if {$debug == 0} {
bind $top <Key> "backDoor %A"
}
pack $top.bfn -in $top.f -side right -padx {3 6}
pack $top.bfp $top.bcm $top.er2 $top.lr2 $top.er1 $top.lr1 \
pack $top.bfp $top.bcm $top.blg $top.er2 $top.lr2 $top.er1 $top.lr1 \
-in $top.f -side right -padx 3
pack $top.bfn $top.bfp $top.bcm -ipadx 15
if {$debug == 1} {
$top.m add cascade -label "Debug" -menu $top.m.md -underline 0
menu $top.m.md
if {$tcl_platform(platform) eq "windows"} {
|