Eskil

Check-in [43a4397331]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Handle if ttk::spinbox is not there since it was introduced later
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 43a439733107f183002a933695d6e1957c5ff3cd
User & Date: peter 2012-06-25 20:28:09.615
Context
2012-06-25
23:02
Cleanup check-in: b2c9278183 user: peter tags: trunk
20:28
Handle if ttk::spinbox is not there since it was introduced later check-in: 43a4397331 user: peter tags: trunk
2012-06-22
00:36
Added -pivot command line flag to control C diff's -pivot. check-in: 42ed1376a6 user: peter tags: trunk
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/print.tcl.
382
383
384
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
413
414
415
        set ::eskil($top,printFile) $apa
        $entry xview end
    }
}

# Fix to give spinbox nicer appearance
proc MySpinBox {w args} {





    ttk::spinbox $w -command [list $w selection clear] -state readonly \

            {*}$args

}

# Create a print dialog for PDF.
proc doPrint {top {quiet 0}} {
    if {$quiet} {
        PrintDiffs $top 1
        return
    }

    destroy .pr
    toplevel .pr -padx 3 -pady 3
    wm title .pr "Print diffs to PDF"

    # Layout

    ttk::label .pr.hsl -anchor w -text "Header Size"
    MySpinBox .pr.hss -textvariable ::Pref(printHeaderSize) \
            -from 5 -to 16 -width 3 -format %g

    ttk::label .pr.cll -anchor w -text "Chars per line"
    ttk::entryX .pr.cle -textvariable ::Pref(printCharsPerLine) -width 4
    ttk::frame .pr.clf
 
    set values [CharsPerLineOptions $top]
    foreach {value label balloon} $values {







>
>
>
>
>
|
>
|
>

















|







382
383
384
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
413
414
415
416
417
418
419
420
421
422
        set ::eskil($top,printFile) $apa
        $entry xview end
    }
}

# Fix to give spinbox nicer appearance
proc MySpinBox {w args} {
    # Handle if ttk::spinbox is not there since it was introduced later
    if {[info commands ttk::spinbox] eq ""} {
        set cmd [list tk::spinbox $w]
    } else {
        set cmd [list ttk::spinbox $w]
        lappend cmd -command [list $w selection clear] -state readonly
    }
    lappend cmd {*}$args
    {*}$cmd
}

# Create a print dialog for PDF.
proc doPrint {top {quiet 0}} {
    if {$quiet} {
        PrintDiffs $top 1
        return
    }

    destroy .pr
    toplevel .pr -padx 3 -pady 3
    wm title .pr "Print diffs to PDF"

    # Layout

    ttk::label .pr.hsl -anchor w -text "Header Size"
    MySpinBox .pr.hss -textvariable ::Pref(printHeaderSize) \
            -from 5 -to 16 -width 3 -format %.0f

    ttk::label .pr.cll -anchor w -text "Chars per line"
    ttk::entryX .pr.cle -textvariable ::Pref(printCharsPerLine) -width 4
    ttk::frame .pr.clf
 
    set values [CharsPerLineOptions $top]
    foreach {value label balloon} $values {