Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Cannot wrap ttk::entry in the way it was done. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
e2d6d6fd24da81f2eb5c59d608c6e534 |
User & Date: | peter 2008-03-05 18:43:36.000 |
Context
2008-03-06
| ||
07:26 | Added -review flag. check-in: 8392c70796 user: peter tags: trunk | |
2008-03-05
| ||
18:43 | Cannot wrap ttk::entry in the way it was done. check-in: e2d6d6fd24 user: peter tags: trunk | |
18:43 | Support for Bazaar. check-in: 38a2c9009a user: peter tags: trunk | |
Changes
Changes to src/dirdiff.tcl.
︙ | ︙ | |||
884 885 886 887 888 889 890 | ttk::button $win.bu -text "Up Both" -command [mymethod UpDir] \ -underline 0 bind $win <Alt-u> "$win.bu invoke" #catch {font delete myfont} #font create myfont -family $Pref(fontfamily) -size $Pref(fontsize) | | | | 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 | ttk::button $win.bu -text "Up Both" -command [mymethod UpDir] \ -underline 0 bind $win <Alt-u> "$win.bu invoke" #catch {font delete myfont} #font create myfont -family $Pref(fontfamily) -size $Pref(fontsize) ttk::entryX $win.e1 -textvariable dirdiff(leftDir) ttk::button $win.bu1 -text "Up" -command [mymethod UpDir 1] ttk::button $win.bb1 -text "Browse" \ -command "[list BrowseDir dirdiff(leftDir) $win.e1] [mymethod DoDirCompare]" $win.e1 xview end ttk::entryX $win.e2 -textvariable dirdiff(rightDir) ttk::button $win.bu2 -text "Up" -command [mymethod UpDir 2] ttk::button $win.bb2 -text "Browse" \ -command "[list BrowseDir dirdiff(rightDir) $win.e2] [mymethod DoDirCompare]" $win.e2 xview end bind $win.e1 <Return> [mymethod DoDirCompare] bind $win.e2 <Return> [mymethod DoDirCompare] |
︙ | ︙ | |||
1014 1015 1016 1017 1018 1019 1020 | set opts [ttk::labelframe $top.opts -text "Options" -padding 3] ttk::checkbutton $opts.cb1 -variable TmpPref(dir,ignorekey) \ -text "Ignore \$Keyword:\$" eval pack [winfo children $opts] -side top -anchor w set filter [ttk::labelframe $top.filter -text "Filter" -padding 3] ttk::label $filter.l1 -text "Include Files" -anchor w | | | | | | 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 | set opts [ttk::labelframe $top.opts -text "Options" -padding 3] ttk::checkbutton $opts.cb1 -variable TmpPref(dir,ignorekey) \ -text "Ignore \$Keyword:\$" eval pack [winfo children $opts] -side top -anchor w set filter [ttk::labelframe $top.filter -text "Filter" -padding 3] ttk::label $filter.l1 -text "Include Files" -anchor w ttk::entryX $filter.e1 -width 20 -textvariable TmpPref(dir,incfiles) ttk::label $filter.l2 -text "Exclude Files" -anchor w ttk::entryX $filter.e2 -width 20 -textvariable TmpPref(dir,exfiles) ttk::label $filter.l3 -text "Include Dirs" -anchor w ttk::entryX $filter.e3 -width 20 -textvariable TmpPref(dir,incdirs) ttk::label $filter.l4 -text "Exclude Dirs" -anchor w ttk::entryX $filter.e4 -width 20 -textvariable TmpPref(dir,exdirs) ttk::checkbutton $filter.cb1 -text "Only revision controlled" \ -variable TmpPref(dir,onlyrev) grid $filter.l1 $filter.e1 -sticky we -padx 3 -pady 3 grid $filter.l2 $filter.e2 -sticky we -padx 3 -pady 3 grid $filter.l3 $filter.e3 -sticky we -padx 3 -pady 3 grid $filter.l4 $filter.e4 -sticky we -padx 3 -pady 3 grid $filter.cb1 - -sticky w -padx 3 -pady 3 |
︙ | ︙ | |||
1058 1059 1060 1061 1062 1063 1064 | } else { destroy $top toplevel $top } wm title $top "Eskil Dir Preprocess" | | | | 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 | } else { destroy $top toplevel $top } wm title $top "Eskil Dir Preprocess" ttk::entryX $top.e1 -textvariable ::dirdiff(pattern) -width 15 ttk::entryX $top.e2 -textvariable ::dirdiff(replace) -width 15 ttk::label $top.l1 -text "Pattern" -anchor w ttk::label $top.l2 -text "Subst" -anchor w grid $top.l1 $top.e1 -sticky we grid $top.l2 $top.e2 -sticky we grid columnconfigure $top 1 -weight 1 |
︙ | ︙ |
Changes to src/eskil.tcl.
︙ | ︙ | |||
125 126 127 128 129 130 131 | # Which is enough to make it reasonable. set bg [ttk::style configure . -background] option add *Menubutton.background $bg option add *Menu.background $bg return $w } } | | | | | 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 | # Which is enough to make it reasonable. set bg [ttk::style configure . -background] option add *Menubutton.background $bg option add *Menu.background $bg return $w } } ::snit::widgetadaptor ttk::entryX { delegate method * to hull delegate option * to hull constructor {args} { installhull using ttk::entry $self configurelist $args # Make sure textvariable is initialised set varName [from args -textvariable ""] if {$varName ne ""} { upvar \#0 $varName var if {![info exists var]} { set var "" |
︙ | ︙ | |||
2339 2340 2341 2342 2343 2344 2345 | } } # 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} { | | | 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 | } } # 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} { ttk::entryX $w -style TLabel eval $w configure $args $w configure -takefocus 0 -state readonly ;#-readonlybackground $bg set i [lsearch $args -textvariable] if {$i >= 0} { set var [lindex $args [expr {$i + 1}]] |
︙ | ︙ | |||
2604 2605 2606 2607 2608 2609 2610 | -command [list makeDocWin $file] -underline 0 } $top.m.help add separator $top.m.help add command -label "About" -command makeAboutWin -underline 0 ttk::label $top.lr1 -text "Rev 1" addBalloon $top.lr1 "Revision number for CVS/RCS/ClearCase diff." | | | | 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 | -command [list makeDocWin $file] -underline 0 } $top.m.help add separator $top.m.help add command -label "About" -command makeAboutWin -underline 0 ttk::label $top.lr1 -text "Rev 1" addBalloon $top.lr1 "Revision number for CVS/RCS/ClearCase diff." ttk::entryX $top.er1 -width 12 -textvariable diff($top,doptrev1) set ::widgets($top,rev1) $top.er1 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.bfp -text "Prev Diff" \ -command [list findDiff $top -1] \ -underline 0 |
︙ | ︙ | |||
2801 2802 2803 2804 2805 2806 2807 | wm title .pr "Eskil Preferences" ttk::frame .pr.fc -borderwidth 1 -relief solid ttk::label .pr.fc.l1 -text "Colours" -anchor w ttk::label .pr.fc.l2 -text "Text" -anchor w ttk::label .pr.fc.l3 -text "Background" -anchor w | | | | | | | | 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 | wm title .pr "Eskil Preferences" ttk::frame .pr.fc -borderwidth 1 -relief solid ttk::label .pr.fc.l1 -text "Colours" -anchor w ttk::label .pr.fc.l2 -text "Text" -anchor w ttk::label .pr.fc.l3 -text "Background" -anchor w ttk::entryX .pr.fc.e1 -textvariable "TmpPref(colorchange)" -width 10 ttk::entryX .pr.fc.e2 -textvariable "TmpPref(colornew1)" -width 10 ttk::entryX .pr.fc.e3 -textvariable "TmpPref(colornew2)" -width 10 ttk::button .pr.fc.b1 -text "Sel" -command "selColor colorchange" ttk::button .pr.fc.b2 -text "Sel" -command "selColor colornew1" ttk::button .pr.fc.b3 -text "Sel" -command "selColor colornew2" ttk::entryX .pr.fc.e4 -textvariable "TmpPref(bgchange)" -width 10 ttk::entryX .pr.fc.e5 -textvariable "TmpPref(bgnew1)" -width 10 ttk::entryX .pr.fc.e6 -textvariable "TmpPref(bgnew2)" -width 10 ttk::button .pr.fc.b4 -text "Sel" -command "selColor bgchange" ttk::button .pr.fc.b5 -text "Sel" -command "selColor bgnew1" ttk::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 |
︙ | ︙ | |||
3017 3018 3019 3020 3021 3022 3023 | proc AddPrefRegsub {top parent} { for {set t 1} {[winfo exists $parent.fr$t]} {incr t} { #Empty } set w [ttk::frame $parent.fr$t -borderwidth 2 -relief groove -padding 3] ttk::label $w.l1 -text "Regexp:" -anchor "w" | | | | 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 | proc AddPrefRegsub {top parent} { for {set t 1} {[winfo exists $parent.fr$t]} {incr t} { #Empty } set w [ttk::frame $parent.fr$t -borderwidth 2 -relief groove -padding 3] ttk::label $w.l1 -text "Regexp:" -anchor "w" ttk::entryX $w.e1 -textvariable ::diff($top,prefregexp$t) -width 60 ttk::label $w.l2 -text "Subst:" -anchor "w" ttk::entryX $w.e2 -textvariable ::diff($top,prefregsub$t) grid $w.l1 $w.e1 -sticky we -padx 3 -pady 3 grid $w.l2 $w.e2 -sticky we -padx 3 -pady 3 grid columnconfigure $w 1 -weight 1 pack $w -side "top" -fill x -padx 3 -pady 3 |
︙ | ︙ | |||
3057 3058 3059 3060 3061 3062 3063 | set ::diff($top,prefregexa) \ "An example TextString FOR_REGSUB /* Comment */" set ::diff($top,prefregexa2) \ "An example TextString FOR_REGSUB /* Comment */" } ttk::labelframe $w.res -text "Preprocessing result" -padding 3 ttk::label $w.res.l3 -text "Example 1:" -anchor "w" | | | | 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 | set ::diff($top,prefregexa) \ "An example TextString FOR_REGSUB /* Comment */" set ::diff($top,prefregexa2) \ "An example TextString FOR_REGSUB /* Comment */" } ttk::labelframe $w.res -text "Preprocessing result" -padding 3 ttk::label $w.res.l3 -text "Example 1:" -anchor "w" ttk::entryX $w.res.e3 -textvariable ::diff($top,prefregexa) -width 60 ttk::label $w.res.l4 -text "Result 1:" -anchor "w" ttk::label $w.res.e4 -textvariable ::diff($top,prefregresult) \ -anchor "w" -width 10 ttk::label $w.res.l5 -text "Example 2:" -anchor "w" ttk::entryX $w.res.e5 -textvariable ::diff($top,prefregexa2) ttk::label $w.res.l6 -text "Result 2:" -anchor "w" ttk::label $w.res.e6 -textvariable ::diff($top,prefregresult2) \ -anchor "w" -width 10 grid $w.res.l3 $w.res.e3 -sticky we -padx 3 -pady 3 grid $w.res.l4 $w.res.e4 -sticky we -padx 3 -pady 3 grid $w.res.l5 $w.res.e5 -sticky we -padx 3 -pady 3 |
︙ | ︙ |
Changes to src/print.tcl.
︙ | ︙ | |||
514 515 516 517 518 519 520 | wm title .pr "Print diffs to PDF" ttk::label .pr.hsl -anchor w -text "Header Size" spinbox .pr.hss -textvariable ::Pref(printHeaderSize) \ -from 5 -to 16 -width 3 ttk::label .pr.cll -anchor w -text "Chars per line" | | | | 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 | wm title .pr "Print diffs to PDF" ttk::label .pr.hsl -anchor w -text "Header Size" spinbox .pr.hss -textvariable ::Pref(printHeaderSize) \ -from 5 -to 16 -width 3 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 [list 80 [CountCharsPerLine $top]] if {[string is digit -strict $::Pref(printCharsPerLine)]} { lappend values $::Pref(printCharsPerLine) } set values [lsort -unique -integer $values] foreach value $values { ttk::radiobutton .pr.clf.$value -variable ::Pref(printCharsPerLine) \ -value $value -text $value pack .pr.clf.$value -side left -padx 3 -pady 3 } # FIXA: Select paper size #set paperlist [lsort -dictionary [pdf4tcl::getPaperSizeList]] #set Pref(printPaper) a4 ttk::label .pr.fnl -anchor w -text "File name" ttk::entryX .pr.fne -textvariable ::diff($top,printFile) -width 30 ttk::button .pr.fnb -text Browse \ -command [list BrowsePrintFileName $top .pr.fne] if {$::diff($top,printFile) eq ""} { set ::diff($top,printFile) "~/eskil.pdf" } |
︙ | ︙ |