Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Better emacs locate. Added "Setup registry" dialog. Fixed tab-sequence in dirdiff window. Added -clip command line parameter. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
25aae51c1cc5bf12aaec8f0b10d249d7 |
User & Date: | peter 2003-09-26 21:02:29.000 |
Context
2003-09-28
| ||
13:55 | Updated to require Tcl/Tk 8.4. Changed version to 2.0a1. Fixed a few bugs introduced by multiple windows in row popup menus and row zooming. Some pad polishing of DirDiff window. check-in: 4e6b144ed3 user: peter tags: trunk | |
2003-09-26
| ||
21:02 | Better emacs locate. Added "Setup registry" dialog. Fixed tab-sequence in dirdiff window. Added -clip command line parameter. check-in: 25aae51c1c user: peter tags: trunk | |
2003-08-26
| ||
20:55 | Follow links to thisScript. Do a better job to locate diff executable on windows. Just update the view when the screen is filled, not during the whole execution. Added directory diff. Added clip diff. check-in: 3e8a51b459 user: peter tags: trunk | |
Changes
Changes to src/eskil.tcl.
︙ | ︙ | |||
24 25 26 27 28 29 30 | # Add a dummy if it does not exists. proc addBalloon {args} {} } else { namespace import -force psballoon::addBalloon } set debug 1 | | | 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | # Add a dummy if it does not exists. proc addBalloon {args} {} } else { namespace import -force psballoon::addBalloon } set debug 1 set diffver "Version 1.9.8+ 2003-09-01" set thisScript [file join [pwd] [info script]] set thisDir [file dirname $thisScript] # Follow any link set tmplink $thisScript while {[file type $tmplink] == "link"} { set tmplink [file readlink $tmplink] |
︙ | ︙ | |||
106 107 108 109 110 111 112 | global util if {[info exists util(editor)]} return if {$::tcl_platform(platform) == "unix"} { set util(editor) emacs } else { set util(editor) wordpad | | > > > | 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 | global util if {[info exists util(editor)]} return if {$::tcl_platform(platform) == "unix"} { set util(editor) emacs } else { set util(editor) wordpad foreach dir [lsort -decreasing -dictionary \ [glob -nocomplain c:/apps/emacs*]] { set em [file join $dir bin runemacs.exe] # Remove catch when this app starts to require 8.4 catch {set em [file normalize $em]} if {[file exists $em]} { set util(editor) $em break } } } } |
︙ | ︙ | |||
2401 2402 2403 2404 2405 2406 2407 | } normalCursor $top if {!$quiet} { destroy .dp toplevel .dp wm title .dp "Diff Print" | | | 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 | } normalCursor $top if {!$quiet} { destroy .dp toplevel .dp wm title .dp "Diff Print" button .dp.b -text "Close" -command {destroy .dp} label .dp.l -anchor w -justify left -text "The following files have\ been created:\n\n$tmpFile\nInput file to enscript.\ \n\n$tmpFile2\nCreated with\ '[lrange $enscriptCmd 0 end-3] \\\n \ [lrange $enscriptCmd end-2 end]'" \ -font "Courier 8" pack .dp.b -side bottom |
︙ | ︙ | |||
2450 2451 2452 2453 2454 2455 2456 | -to 1.0 -variable grayLevel2 frame .pr.f radiobutton .pr.r1 -text "No Syntax" -variable prettyPrint -value "" radiobutton .pr.r2 -text "VHDL" -variable prettyPrint -value "vhdl" radiobutton .pr.r3 -text "Tcl" -variable prettyPrint -value "tcl" radiobutton .pr.r4 -text "C" -variable prettyPrint -value "c" | | | | 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 | -to 1.0 -variable grayLevel2 frame .pr.f radiobutton .pr.r1 -text "No Syntax" -variable prettyPrint -value "" radiobutton .pr.r2 -text "VHDL" -variable prettyPrint -value "vhdl" radiobutton .pr.r3 -text "Tcl" -variable prettyPrint -value "tcl" radiobutton .pr.r4 -text "C" -variable prettyPrint -value "c" button .pr.b1 -text "Print" -width 7 \ -command "destroy .pr; update; printDiffs $top" button .pr.b2 -text "Cancel" -width 7 \ -command {destroy .pr} grid .pr.l1 - -sticky we grid .pr.l2 - -sticky we grid .pr.s1 - -sticky we grid .pr.s2 - -sticky we grid .pr.f - -sticky we |
︙ | ︙ | |||
2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 | proc scrollText {top n what} { # Do not scroll if focus is in a text window. # This is for scroll bindings in the toplevel. if {[winfo class [focus]] != "Text"} { $::diff($top,wDiff1) yview scroll $n $what } } # Emulate a label that: # 1 : Displays the right part of the text if there isn't enough room # 2 : Justfify text to the left if there is enough room. # 3 : Does not try to allocate space according to its contents proc fileLabel {w args} { eval label $w $args | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 | proc scrollText {top n what} { # Do not scroll if focus is in a text window. # This is for scroll bindings in the toplevel. if {[winfo class [focus]] != "Text"} { $::diff($top,wDiff1) yview scroll $n $what } } # Experiment using snit if {[catch {package require snit}]} { namespace eval snit { proc widgetadaptor {args} {} } } # Emulate a label that: # 1 : Displays the right part of the text if there isn't enough room # 2 : Justfify text to the left if there is enough room. # 3 : Does not try to allocate space according to its contents ::snit::widgetadaptor FileLabel { delegate method * to hull delegate option * to hull constructor {args} { eval label $self $args set fg [$self cget -foreground] set bg [$self cget -background] set font [$self cget -font] destroy $self installhull [entry $self -relief flat -bd 0 -highlightthickness 0 \ -foreground $fg -background $bg -font $font] $self configurelist $args $self configure -takefocus 0 -state readonly -readonlybackground $bg set var [$self cget -textvariable] if {$var != ""} { uplevel \#0 "[list trace variable $var w] \ {[list after idle [mymethod xview end]] ;#}" } } } # Emulate a label that: # 1 : Displays the right part of the text if there isn't enough room # 2 : Justfify text to the left if there is enough room. # 3 : Does not try to allocate space according to its contents proc fileLabel {w args} { eval label $w $args |
︙ | ︙ | |||
2979 2980 2981 2982 2983 2984 2985 | wm title $top "Diff" wm protocol $top WM_DELETE_WINDOW [list cleanupAndExit $top] frame $top.f grid $top.f -row 0 -columnspan 4 -sticky news | > > > > > | | 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 | wm title $top "Diff" wm protocol $top WM_DELETE_WINDOW [list cleanupAndExit $top] frame $top.f grid $top.f -row 0 -columnspan 4 -sticky news if {$tcl_platform(platform) == "windows"} { #frame $top.f.line -height 1 -bg SystemButtonHighlight #pack $top.f.line -side bottom -fill x } menubutton $top.mf -text "File" -underline 0 -menu $top.mf.m menu $top.mf.m if {$debug == 1} { $top.mf.m add command -label "Redo Diff" -underline 5 \ -command [list doDiff $top] } else { $top.mf.m add command -label "Redo Diff" -underline 5 \ -command [list doDiff $top] \ |
︙ | ︙ | |||
3071 3072 3073 3074 3075 3076 3077 | $top.mo.mp add radiobutton -label "Words" \ -variable Pref(lineparsewords) -value "1" $top.mo.mp add separator $top.mo.mp add checkbutton -label "Use 2nd stage" \ -variable Pref(extralineparse) $top.mo.mp add checkbutton -label "Mark last" -variable Pref(marklast) | | | > > > > > > > | 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 | $top.mo.mp add radiobutton -label "Words" \ -variable Pref(lineparsewords) -value "1" $top.mo.mp add separator $top.mo.mp add checkbutton -label "Use 2nd stage" \ -variable Pref(extralineparse) $top.mo.mp add checkbutton -label "Mark last" -variable Pref(marklast) menubutton $top.ms -text "Search" -underline 0 -menu $top.ms.m menu $top.ms.m if {[info procs textSearch::searchMenu] != ""} { textSearch::searchMenu $top.ms.m } else { $top.ms.m add command -label "Text search not available" \ -state disabled } menubutton $top.mt -text "Tools" -underline 0 -menu $top.mt.m menu $top.mt.m $top.mt.m add command -label "New Diff Window" -underline 0 \ -command makeDiffWin $top.mt.m add command -label "Directory Diff" -underline 0 \ -command makeDirDiffWin $top.mt.m add command -label "Clip Diff" -underline 0 \ -command makeClipDiffWin if {$::tcl_platform(platform) == "windows"} { if {![catch {package require registry}]} { $top.mt.m add separator $top.mt.m add command -label "Setup Registry" -underline 6 \ -command makeRegistryWin } } menubutton $top.mh -text "Help" -underline 0 -menu $top.mh.m menu $top.mh.m $top.mh.m add command -label "Help" -command makeHelpWin -underline 0 $top.mh.m add command -label "About" -command makeAboutWin -underline 0 label $top.lo -text "Diff Options" |
︙ | ︙ | |||
3199 3200 3201 3202 3203 3204 3205 | bind $top <Key-Up> [list scrollText $top -1 u] bind $top <Key-Down> [list scrollText $top 1 u] bind $top <Key-Prior> [list scrollText $top -1 p] bind $top <Key-Next> [list scrollText $top 1 p] bind $top <Key-Escape> [list focus $top] | | | | | | 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 | bind $top <Key-Up> [list scrollText $top -1 u] bind $top <Key-Down> [list scrollText $top 1 u] bind $top <Key-Prior> [list scrollText $top -1 p] bind $top <Key-Next> [list scrollText $top 1 p] bind $top <Key-Escape> [list focus $top] pack $top.mf $top.mo $top.ms $top.mt -in $top.f -side left -anchor n pack $top.mh -in $top.f -side left -anchor n pack $top.bfn -in $top.f -side right -padx {3 6} pack $top.bfp $top.er2 $top.lr2 $top.er1 $top.lr1 $top.eo $top.lo \ -in $top.f -side right -padx 3 if {$debug == 1} { menubutton $top.md -text "Debug" -menu $top.md.m -underline 0 menu $top.md.m if {$tcl_platform(platform) == "windows"} { $top.md.m add checkbutton -label "Console" -variable consolestate \ -onvalue show -offvalue hide \ -command {console $consolestate} $top.md.m add separator } $top.md.m add radiobutton -label "Context 2" \ -variable ::Pref(context) -value 2 $top.md.m add radiobutton -label "Context 5" \ -variable ::Pref(context) -value 5 $top.md.m add radiobutton -label "Context 10" \ -variable ::Pref(context) -value 10 $top.md.m add radiobutton -label "Context 20" \ -variable ::Pref(context) -value 20 $top.md.m add separator $top.md.m add checkbutton -label "Wrap" -variable wrapstate \ -onvalue char -offvalue none -command \ "$top.ft1.tt configure -wrap \$wrapstate ;\ $top.ft2.tt configure -wrap \$wrapstate" $top.md.m add command -label "Merge" -command [list makeMergeWin $top] $top.md.m add command -label "Date Filter" \ -command {set ::diff(filter) {^Date}} $top.md.m add command -label "Align" -command [list runAlign $top] |
︙ | ︙ | |||
3244 3245 3246 3247 3248 3249 3250 | $top.md.m add command -label "Normal Cursor" \ -command [list normalCursor $top] $top.md.m add separator $top.md.m add command -label "Evalstats" -command {evalstats} $top.md.m add command -label "_stats" -command {parray _stats} $top.md.m add command -label "Nuisance" -command {makeNuisance \ "It looks like you are trying out the debug menu."} | | | 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 | $top.md.m add command -label "Normal Cursor" \ -command [list normalCursor $top] $top.md.m add separator $top.md.m add command -label "Evalstats" -command {evalstats} $top.md.m add command -label "_stats" -command {parray _stats} $top.md.m add command -label "Nuisance" -command {makeNuisance \ "It looks like you are trying out the debug menu."} pack $top.md -in $top.f -side left -padx 20 -anchor n } initDiffData $top } # Set new preferences. proc applyPref {} { |
︙ | ︙ | |||
3293 3294 3295 3296 3297 3298 3299 | destroy .pr toplevel .pr wm title .pr "Diff Preferences" frame .pr.fc -borderwidth 1 -relief solid | | | | | | | | | | | 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 | destroy .pr toplevel .pr wm title .pr "Diff Preferences" frame .pr.fc -borderwidth 1 -relief solid label .pr.fc.l1 -text "Colours" -anchor w label .pr.fc.l2 -text "Text" -anchor w label .pr.fc.l3 -text "Background" -anchor w entry .pr.fc.e1 -textvariable "TmpPref(colorchange)" -width 10 entry .pr.fc.e2 -textvariable "TmpPref(colornew1)" -width 10 entry .pr.fc.e3 -textvariable "TmpPref(colornew2)" -width 10 button .pr.fc.b1 -text "Sel" -command "selColor colorchange" button .pr.fc.b2 -text "Sel" -command "selColor colornew1" button .pr.fc.b3 -text "Sel" -command "selColor colornew2" entry .pr.fc.e4 -textvariable "TmpPref(bgchange)" -width 10 entry .pr.fc.e5 -textvariable "TmpPref(bgnew1)" -width 10 entry .pr.fc.e6 -textvariable "TmpPref(bgnew2)" -width 10 button .pr.fc.b4 -text "Sel" -command "selColor bgchange" button .pr.fc.b5 -text "Sel" -command "selColor bgnew1" button .pr.fc.b6 -text "Sel" -command "selColor bgnew2" text .pr.fc.t1 -width 12 -height 1 -font myfont -takefocus 0 text .pr.fc.t2 -width 12 -height 1 -font myfont -takefocus 0 text .pr.fc.t3 -width 12 -height 1 -font myfont -takefocus 0 .pr.fc.t1 tag configure change -foreground $TmpPref(colorchange) \ -background $TmpPref(bgchange) .pr.fc.t2 tag configure new1 -foreground $TmpPref(colornew1) \ |
︙ | ︙ | |||
3389 3390 3391 3392 3393 3394 3395 | pack .fo.ltmp update catch {font delete tmpfont} font create tmpfont array set TmpPref [array get Pref] | | | | | | | | 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 | pack .fo.ltmp update catch {font delete tmpfont} font create tmpfont array set TmpPref [array get Pref] label .fo.lf -text "Family" -anchor w set lb [Scroll y listbox .fo.lb -width 15 -height 10 \ -exportselection no -selectmode single] bind $lb <<ListboxSelect>> [list exampleFont $lb] label .fo.ls -text "Size" -anchor w button .fo.bm -text - -padx 0 -pady 0 -highlightthickness 0 \ -command "incr TmpPref(fontsize) -1 ; exampleFont $lb" button .fo.bp -text + -padx 0 -pady 0 -highlightthickness 0 \ -command "incr TmpPref(fontsize) ; exampleFont $lb" entry .fo.es -textvariable TmpPref(fontsize) -width 3 bind .fo.es <KeyPress> [list after idle [list exampleFont $lb]] label .fo.le -text "Example" -anchor w -font tmpfont -width 1 button .fo.bo -text "Ok" -command "applyFont; destroy .fo" button .fo.ba -text "Apply" -command "applyFont" button .fo.bc -text "Close" -command "destroy .fo" if {![info exists FontCache]} { set fam [lsort -dictionary [font families]] font create testfont foreach f $fam { if {![string equal $f ""]} { font configure testfont -family $f |
︙ | ︙ | |||
3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 | grid x .fo.bc - - -sticky we -padx 2 -pady 2 grid .fo.lb -sticky news -rowspan 5 grid columnconfigure .fo 0 -weight 1 grid rowconfigure .fo 1 -weight 1 exampleFont $lb } ##################################### # Directory diff section ##################################### # Compare file names proc FStrCmp {s1 s2} { | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 | grid x .fo.bc - - -sticky we -padx 2 -pady 2 grid .fo.lb -sticky news -rowspan 5 grid columnconfigure .fo 0 -weight 1 grid rowconfigure .fo 1 -weight 1 exampleFont $lb } ##################################### # Registry section ##################################### # A little labelframe thingy for pre 8.4 proc myLabelFrame {w args} { if {[info tclversion] >= 8.4} { return [eval [list labelframe $w] $args] } if {([llength $args] % 2) != 0} { error "wrong # args: should be \"myLabelFrame pathName ?options?\"" } set allopts {} set fopts {} set lopts {} set labelanchor nw set padx 0 set pady 0 set bd 2 set relief groove set labelwindow "" set text "" foreach {opt val} $args { switch -- $opt { -bd - -borderwidth { set bd $val } -relief { set relief $val } -text { lappend lopts $opt $val set text $val } -font - -fg - -foreground { lappend lopts $opt $val } -labelanchor { set labelanchor $val } -labelwindow { set labelwindow $val } -padx { set padx $val } -pady { set pady $val } -bg - -background - -cursor { lappend allopts $opt $val } default { error "Unknown or unsupported option: $opt" } } } lappend fopts -relief $relief -bd $bd eval [list frame $w] $allopts eval [list frame $w.bd] $fopts $allopts if {$labelwindow != ""} { set lw $labelwindow raise $labelwindow $w } elseif {$text != ""} { set lw $w.l eval [list label $lw] $lopts $allopts -highlightthickness 0 -bd 0 } else { set lw "" } eval [list frame $w.f] $allopts grid columnconfigure $w {2 4} -minsize $padx grid rowconfigure $w {2 4} -minsize $pady grid columnconfigure $w 3 -weight 1 grid rowconfigure $w 3 -weight 1 grid columnconfigure $w {1 5} -minsize $bd grid rowconfigure $w {1 5} -minsize $bd grid $w.bd -row 1 -col 1 -rowspan 5 -columnspan 5 -sticky news grid $w.f -row 3 -col 3 -sticky news if {$lw != ""} { switch -glob $labelanchor { n* { grid $lw -in $w -row 0 -col 2 -rowspan 2 -columnspan 3 -padx 4 } s* { grid $lw -in $w -row 5 -col 2 -rowspan 2 -columnspan 3 -padx 4 } w* { grid $lw -in $w -row 2 -col 0 -rowspan 3 -columnspan 2 -pady 4 } e* { grid $lw -in $w -row 2 -col 5 -rowspan 3 -columnspan 2 -pady 4 } } grid $lw -sticky [string index $labelanchor 1] } return $w.f } proc makeRegistryFrame {w label key newvalue} { set old {} catch {set old [registry get $key {}]} set l [myLabelFrame $w -text $label -padx 4 -pady 4] label $l.key1 -text "Key:" label $l.key2 -text $key label $l.old1 -text "Old value:" label $l.old2 -text $old label $l.new1 -text "New value:" label $l.new2 -text $newvalue button $l.change -text "Change" -width 10 -command \ "[list registry set $key {} $newvalue] ; \ [list $l.change configure -state disabled]" if {[string equal $newvalue $old]} { $l.change configure -state disabled } grid $l.key1 $l.key2 -sticky w -padx 4 -pady 4 grid $l.old1 $l.old2 -sticky w -padx 4 -pady 4 grid $l.new1 $l.new2 -sticky w -padx 4 -pady 4 grid $l.change - -sticky e -padx 4 -pady 4 grid columnconfigure $l 1 -weight 1 } proc makeRegistryWin {} { global thisDir thisScript util set top .reg destroy $top toplevel $top wm title $top "Register Diff" # Registry keys #set keyg {HKEY_CLASSES_ROOT\Folder\shell\Grep\command} set keydd {HKEY_CLASSES_ROOT\Folder\shell\Diff\command} set keyd {HKEY_CLASSES_ROOT\*\shell\Diff\command} set keyc {HKEY_CLASSES_ROOT\*\shell\DiffC\command} set keye {HKEY_CLASSES_ROOT\*\shell\Emacs\command} # Locate executable for this program set exe [info nameofexecutable] # Are we in a starkit? if {[info exists ::starkit::topdir]} { # In a starpack ? set exe [file normalize $exe] if {[string equal [file normalize $::starkit::topdir] $exe]} { set myexe [list $exe] } else { set myexe [list $exe $::starkit::topdir] } } else { if {[regexp {wish\d+\.exe} $exe]} { set exe [file join [file dirname $exe] wish.exe] if {[file exists $exe]} { set myexe [list $exe] } } set myexe [list $exe $thisScript] } set valbase {} foreach item $myexe { lappend valbase \"[file nativename $item]\" } set valbase [join $valbase] set new "$valbase -browse \"%1\"" makeRegistryFrame $top.d "Diff" $keyd $new set new "$valbase -o \"%1\" -conflict \"%1\"" makeRegistryFrame $top.c "Diff Conflict" $keyc $new set new "$valbase \"%1\"" makeRegistryFrame $top.dd "Directory Diff" $keydd $new pack $top.d $top.c $top.dd -side top -fill x -padx 4 -pady 4 locateEditor if {[string match "*runemacs.exe" $util(editor)]} { # Set up emacs set newkey "\"[file nativename $util(editor)]\" \"%1\"" makeRegistryFrame $top.e "Emacs" $keye $newkey pack $top.e -side top -fill x -padx 4 -pady 4 } button $top.close -text "Close" -width 10 -command [list destroy $top] \ -default active pack $top.close -side bottom -pady 4 bind $top <Key-Return> [list destroy $top] bind $top <Key-Escape> [list destroy $top] } ##################################### # Directory diff section ##################################### # Compare file names proc FStrCmp {s1 s2} { |
︙ | ︙ | |||
3917 3918 3919 3920 3921 3922 3923 | -label "Use Diff" $top.mo.mc add radiobutton -variable Pref(comparelevel) -value 3 \ -label "Diff, ignore blanks" $top.mo.mc add radiobutton -variable Pref(comparelevel) -value 4 \ -label "Diff, ignore case" $top.mo.mc add radiobutton -variable Pref(comparelevel) -value 5 \ -label "Diff, ignore RCS" | | < < | | > > | | | | 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 | -label "Use Diff" $top.mo.mc add radiobutton -variable Pref(comparelevel) -value 3 \ -label "Diff, ignore blanks" $top.mo.mc add radiobutton -variable Pref(comparelevel) -value 4 \ -label "Diff, ignore case" $top.mo.mc add radiobutton -variable Pref(comparelevel) -value 5 \ -label "Diff, ignore RCS" pack $top.mf $top.mo -in $top.fm -side left -anchor n if {$::debug} { menubutton $top.md -text "Debug" -menu $top.md.m -underline 0 menu $top.md.m if {$::tcl_platform(platform) == "windows"} { $top.md.m add checkbutton -label "Console" -variable consolestate \ -onvalue show -offvalue hide -command {console $consolestate} $top.md.m add separator } $top.md.m add command -label "Reread Source" -underline 0 \ -command {source $thisScript} $top.md.m add separator $top.md.m add command -label "Redraw Window" -command {makeDirDiffWin 1} pack $top.md -in $top.fm -side left -padx 20 } button $top.bu -text "Up Both" -command upDir -underline 0 bind $top <Alt-u> "$top.bu invoke" button $top.bc -text "Compare" -command doCompare -underline 0 bind $top <Alt-c> "$top.bc invoke" pack $top.bc $top.bu -in $top.fm -side right catch {font delete myfont} font create myfont -family $Pref(fontfamily) -size $Pref(fontsize) entry $top.e1 -textvariable dirdiff(leftDir) button $top.bu1 -text "Up" -command {upDir 1} button $top.bb1 -text "Browse" -command {browseDir dirdiff(leftDir)} entry $top.e2 -textvariable dirdiff(rightDir) button $top.bu2 -text "Up" -command {upDir 2} button $top.bb2 -text "Browse" -command {browseDir dirdiff(rightDir)} bind $top.e1 <Return> doCompare bind $top.e2 <Return> doCompare pack $top.bb1 $top.bu1 -in $top.fe1 -side right pack $top.e1 -in $top.fe1 -side left -fill x -expand 1 pack $top.bb2 $top.bu2 -in $top.fe2 -side right pack $top.e2 -in $top.fe2 -side left -fill x -expand 1 text $top.t1 -height 40 -width 60 -wrap none -font myfont \ -xscrollcommand "$top.sbx1 set" -takefocus 0 scrollbar $top.sby -orient vertical scrollbar $top.sbx1 -orient horizontal -command "$top.t1 xview" text $top.t2 -height 40 -width 60 -wrap none -font myfont \ -xscrollcommand "$top.sbx2 set" -takefocus 0 scrollbar $top.sbx2 -orient horizontal -command "$top.t2 xview" commonYScroll $top.sby $top.t1 $top.t2 canvas $top.c -width 4 bind $top.t1 <Double-Button-1> "after idle selectFile $top.t1 %x %y" bind $top.t2 <Double-Button-1> "after idle selectFile $top.t2 %x %y" bind $top.t1 <Button-3> "rightClick $top.t1 %x %y %X %Y" |
︙ | ︙ | |||
4060 4061 4062 4063 4064 4065 4066 | bind $top <Alt-r> "[list $top.f.b3 invoke] ; [list focus $t2]" button $top.f.b4 -text "Left Clear&Paste" -command \ "$t1 delete 1.0 end ; event generate $t1 <<Paste>>" button $top.f.b5 -text "Right Clear&Paste" -command \ "$t2 delete 1.0 end ; event generate $t2 <<Paste>>" foreach w [list $top.f.b2 $top.f.b4 $top.f.b $top.f.b3 $top.f.b5] { | | > | 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 | bind $top <Alt-r> "[list $top.f.b3 invoke] ; [list focus $t2]" button $top.f.b4 -text "Left Clear&Paste" -command \ "$t1 delete 1.0 end ; event generate $t1 <<Paste>>" button $top.f.b5 -text "Right Clear&Paste" -command \ "$t2 delete 1.0 end ; event generate $t2 <<Paste>>" foreach w [list $top.f.b2 $top.f.b4 $top.f.b $top.f.b3 $top.f.b5] { raise $w } grid $top.f.mf $top.f.b2 $top.f.b4 x $top.f.b x $top.f.b3 $top.f.b5 x \ -padx 4 -pady 2 -sticky w grid $top.f.mf -sticky nw -pady 0 -padx 0 grid columnconfigure $top.f {0 3 5 8} -weight 1 grid columnconfigure $top.f 8 -minsize [winfo reqwidth $top.f.mf] grid $top.f - -sticky we grid $top.t1 $top.t2 -sticky news grid $top.t2 -padx {2 0} grid rowconfigure $top 1 -weight 1 |
︙ | ︙ | |||
4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 | looks for an RCS/CVS directory next to the file, and if found, runs in RCS/CVS mode. Options: -nodiff : Normally, if there are enough information on the command line to run diff, diff.tcl will do so unless this option is specified. -noparse : Diff.tcl can perform analysis of changed blocks to -line : improve display. See online help for details. -smallblock : The default. Do block analysis on small blocks. -block : Full block analysis. This can be slow if there are large change blocks. | > > | 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 | looks for an RCS/CVS directory next to the file, and if found, runs in RCS/CVS mode. Options: -nodiff : Normally, if there are enough information on the command line to run diff, diff.tcl will do so unless this option is specified. -dir : Start in directory diff mode. Ignores other args. -clip : Start in clip diff mode. Ignores other args. -noparse : Diff.tcl can perform analysis of changed blocks to -line : improve display. See online help for details. -smallblock : The default. Do block analysis on small blocks. -block : Full block analysis. This can be slow if there are large change blocks. |
︙ | ︙ | |||
4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 | makeDiffWin return } set noautodiff 0 set autobrowse 0 set dodir 0 set files "" set nextArg "" set revNo 1 foreach arg $argv { if {$nextArg != ""} { if {$nextArg == "mergeFile"} { set opts(mergeFile) [file join [pwd] $arg] | > | 4516 4517 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528 4529 4530 | makeDiffWin return } set noautodiff 0 set autobrowse 0 set dodir 0 set doclip 0 set files "" set nextArg "" set revNo 1 foreach arg $argv { if {$nextArg != ""} { if {$nextArg == "mergeFile"} { set opts(mergeFile) [file join [pwd] $arg] |
︙ | ︙ | |||
4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 | set Pref(extralineparse) 0 } elseif {$arg == "-limit"} { set nextArg limitlines } elseif {$arg == "-nodiff"} { set noautodiff 1 } elseif {$arg == "-dir"} { set dodir 1 } elseif {$arg == "-browse"} { set autobrowse 1 } elseif {$arg == "-conflict"} { set opts(mode) "conflict" set Pref(ignore) " " } elseif {$arg == "-print"} { set nextArg printFile | > > | 4566 4567 4568 4569 4570 4571 4572 4573 4574 4575 4576 4577 4578 4579 4580 4581 | set Pref(extralineparse) 0 } elseif {$arg == "-limit"} { set nextArg limitlines } elseif {$arg == "-nodiff"} { set noautodiff 1 } elseif {$arg == "-dir"} { set dodir 1 } elseif {$arg == "-clip"} { set doclip 1 } elseif {$arg == "-browse"} { set autobrowse 1 } elseif {$arg == "-conflict"} { set opts(mode) "conflict" set Pref(ignore) " " } elseif {$arg == "-print"} { set nextArg printFile |
︙ | ︙ | |||
4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 | if {$apa == ""} { puts "Ignoring argument: $arg" } else { lappend files [lindex $apa 0] } } } # Figure out if we start in a diff or dirdiff window. set len [llength $files] if {$len == 0 && $dodir} { set dirdiff(leftDir) [pwd] set dirdiff(rightDir) [pwd] | > > > > > > | 4602 4603 4604 4605 4606 4607 4608 4609 4610 4611 4612 4613 4614 4615 4616 4617 4618 4619 4620 4621 | if {$apa == ""} { puts "Ignoring argument: $arg" } else { lappend files [lindex $apa 0] } } } # Do we start in clip diff mode? if {$doclip} { makeClipDiffWin return } # Figure out if we start in a diff or dirdiff window. set len [llength $files] if {$len == 0 && $dodir} { set dirdiff(leftDir) [pwd] set dirdiff(rightDir) [pwd] |
︙ | ︙ | |||
4547 4548 4549 4550 4551 4552 4553 4554 4555 4556 4557 4558 | } } if {![info exists gurkmeja]} { set gurkmeja 1 option add *Menu.tearOff 0 option add *Scrollbar.highlightThickness 0 getOptions wm withdraw . parseCommandLine } | > > > > > > > > > > > | 4807 4808 4809 4810 4811 4812 4813 4814 4815 4816 4817 4818 4819 4820 4821 4822 4823 4824 4825 4826 4827 4828 4829 | } } if {![info exists gurkmeja]} { set gurkmeja 1 option add *Menu.tearOff 0 if {$tcl_platform(platform) == "windows"} { #option add *Menubutton.activeBackground SystemHighlight #option add *Menubutton.activeForeground SystemHighlightText option add *Menubutton.padY 1 } option add *Scrollbar.highlightThickness 0 option add *Scrollbar.takeFocus 0 if {0 && [bind all <Alt-KeyPress>] == ""} { bind all <Alt-KeyPress> [bind Menubutton <Alt-KeyPress>] #after 500 "tk_messageBox -message Miffo" } getOptions wm withdraw . parseCommandLine } |