Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Added edit file on context menu. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
b1509ddd5915c6a11c73357f9d9a3252 |
User & Date: | spjutp 2002-04-12 10:51:17.000 |
Context
2002-04-12
| ||
11:02 | Removed code for supporting Tk < 8.3. check-in: 1c55ec033b user: spjutp tags: trunk | |
10:51 | Added edit file on context menu. check-in: b1509ddd59 user: spjutp tags: trunk | |
10:48 | Fixed CVS on windows. check-in: a94ed66d1e user: spjutp tags: trunk | |
Changes
Changes to dirdiff.tcl.
1 2 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | - + + + + + + + + + + + + + + + + + + + | #!/bin/sh # |
︙ | |||
51 52 53 54 55 56 57 58 59 60 61 62 63 64 | 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 | + + + | proc compareFiles {file1 file2} { global Pref file stat $file1 stat1 file stat $file2 stat2 if {[file isdirectory $file1] != [file isdirectory $file2]} { return 0 } if {$stat1(size) == $stat2(size) && $Pref(comparelevel) == 0} { return 1 } if {$stat1(size) == $stat2(size) && $stat1(mtime) == $stat2(mtime)} { return 1 } if {$Pref(comparelevel) == 0} { #Do not check contents return 0 } |
︙ | |||
88 89 90 91 92 93 94 | 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 | - + - + - + - + | if {([eof $ch1] + [eof $ch2]) < 2} { set eq 0 } close $ch1 close $ch2 } 2 { #Simple external diff |
︙ | |||
185 186 187 188 189 190 191 | 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 | - + - + | lappend infoFiles $info } proc compareDirs {dir1 dir2 {level 0}} { global Pref set olddir [pwd] cd $dir1 |
︙ | |||
324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 | 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 | + + + + | } elseif {($i & 3) == 0} { # Both exists .m add command -label "Compare Files" -command [list \ remoteDiff $lf $rf] } if {$w == ".t1" && ($i & 13) == 0} { .m add command -label "Copy File" -command [list \ copyFile $row right] .m add command -label "Edit File" -command [list \ editFile $row left] } if {$w == ".t2" && ($i & 14) == 0} { .m add command -label "Copy File" -command [list \ copyFile $row left] .m add command -label "Edit File" -command [list \ editFile $row right] } tk_popup .m $X $Y } proc copyFile {row to} { global leftDir rightDir leftFiles rightFiles infoFiles Pref |
︙ | |||
360 361 362 363 364 365 366 367 368 369 370 371 372 373 | 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 | + + + + + + + + + + + + + + | } else { if {[tk_messageBox -icon question -title "Copy file?" -message \ "Copy\n$src\nto\n$dst ?" -type yesno] == "yes"} { file copy $src $dst } } } proc editFile {row from} { global leftDir rightDir leftFiles rightFiles infoFiles Pref if {$from == "left"} { set src [file join $leftDir [lindex $leftFiles $row]] } elseif {$from == "right"} { set src [file join $rightDir [lindex $rightFiles $row]] } else { error "Bad from argument to editFile: $from" } exec $::editor $src & } proc remoteDiff {file1 file2} { global tcl_platform set cmd [list remoteDiff $file1 $file2] if {$tcl_platform(platform) == "unix"} { #send -async Diff $cmd |
︙ |