Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Adapting more to Tile |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
9e3510e82703f63347ea9e114cade2b8 |
User & Date: | peter 2008-02-20 20:50:39.000 |
Context
2008-02-21
| ||
06:31 | Moved ttk adaptions to last in Init, to accomodate test suite. check-in: cbfbef9a6f user: peter tags: trunk | |
2008-02-20
| ||
20:50 | Adapting more to Tile check-in: 9e3510e827 user: peter tags: trunk | |
18:18 | Checked in for reference check-in: b905a7dedc user: peter tags: trunk | |
Changes
Changes to src/clip.tcl.
︙ | ︙ | |||
67 68 69 70 71 72 73 | set ::diff(wClip1) $t1 set ::diff(wClip2) $t2 bind $t1 <Control-o> [list focus $t2] bind $t2 <Control-o> [list focus $t1] | | | | | | | | 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 | set ::diff(wClip1) $t1 set ::diff(wClip2) $t2 bind $t1 <Control-o> [list focus $t2] bind $t2 <Control-o> [list focus $t1] ttk::frame $top.f menubutton $top.f.mf -menu $top.f.mf.m -text "File" -underline 0 menu $top.f.mf.m $top.f.mf.m add command -label "Close" -underline 0 \ -command [list cleanupAndExit $top] $top.f.mf.m add separator $top.f.mf.m add command -label "Quit" -underline 0 \ -command [list cleanupAndExit all] ttk::button $top.f.b -text "Diff" -command DoClipDiff -underline 0 -width 8 bind $top <Alt-d> [list $top.f.b invoke] ttk::button $top.f.b2 -text "Left Clear" -command "$t1 delete 1.0 end" \ -underline 0 bind $top <Alt-l> "[list $top.f.b2 invoke] ; [list focus $t1]" ttk::button $top.f.b3 -text "Right Clear" -command "$t2 delete 1.0 end" \ -underline 0 bind $top <Alt-r> "[list $top.f.b3 invoke] ; [list focus $t2]" ttk::button $top.f.b4 -text "Left Clear&Paste" -command \ "$t1 delete 1.0 end ; event generate $t1 <<Paste>>" ttk::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" |
︙ | ︙ |
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::entry $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::entry $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::entry $filter.e1 -width 20 -textvariable TmpPref(dir,incfiles) ttk::label $filter.l2 -text "Exclude Files" -anchor w ttk::entry $filter.e2 -width 20 -textvariable TmpPref(dir,exfiles) ttk::label $filter.l3 -text "Include Dirs" -anchor w ttk::entry $filter.e3 -width 20 -textvariable TmpPref(dir,incdirs) ttk::label $filter.l4 -text "Exclude Dirs" -anchor w ttk::entry $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::entry $top.e1 -textvariable ::dirdiff(pattern) -width 15 ttk::entry $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.
︙ | ︙ | |||
66 67 68 69 70 71 72 | # 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 } } | > | | | 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 | # 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 } } rename ttk::entry ttk::_entry ::snit::widgetadaptor ttk::entry { 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 "" |
︙ | ︙ | |||
93 94 95 96 97 98 99 | $hull xview [$hull index $ix] } else { eval $hull xview $args } } } | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 | $hull xview [$hull index $ix] } else { eval $hull xview $args } } } interp alias {} toplevel {} ttk::toplevel package require wcb if {[catch {package require psballoon}]} { # Add a dummy if it does not exist. proc addBalloon {args} {} } else { |
︙ | ︙ | |||
1972 1973 1974 1975 1976 1977 1978 | set scrolly 1 } default { return -code error "Bad scrolldirection \"$dir\"" } } | | | 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 | set scrolly 1 } default { return -code error "Bad scrolldirection \"$dir\"" } } ttk::frame $w eval [list $class $w.s] $args # Move border properties to frame set bw [$w.s cget -borderwidth] set relief [$w.s cget -relief] $w configure -relief $relief -borderwidth $bw $w.s configure -borderwidth 0 |
︙ | ︙ | |||
2386 2387 2388 2389 2390 2391 2392 | 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 | < < < < < < < < < < < < < < < < < < < < < < < < < < < | | 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 | 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 proc fileLabel {w args} { ttk::entry $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}]] |
︙ | ︙ | |||
2514 2515 2516 2517 2518 2519 2520 | toplevel $top lappend ::diff(diffWindows) $top } wm title $top "Eskil:" wm protocol $top WM_DELETE_WINDOW [list cleanupAndExit $top] | | | 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 | toplevel $top lappend ::diff(diffWindows) $top } wm title $top "Eskil:" wm protocol $top WM_DELETE_WINDOW [list cleanupAndExit $top] ttk::frame $top.f grid $top.f -row 0 -columnspan 4 -sticky nws lappend ::widgets(toolbars) $top.f if {!$::Pref(toolbar)} { grid remove $top.f } if {$tcl_platform(platform) eq "windows"} { |
︙ | ︙ | |||
2684 2685 2686 2687 2688 2689 2690 | -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." | | | | | | | | | 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 | -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::entry $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::entry $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 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] 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) ttk::frame $top.ft1 -borderwidth 2 -relief sunken text $top.ft1.tl -height $Pref(lines) -width 5 -wrap none \ -font myfont -borderwidth 0 -padx 0 -highlightthickness 0 \ -takefocus 0 text $top.ft1.tt -height $Pref(lines) -width $Pref(linewidth) -wrap none \ -xscrollcommand [list $top.sbx1 set] \ -font myfont -borderwidth 0 -padx 1 \ -highlightthickness 0 catch {$top.ft1.tt configure -tabstyle wordprocessor} ;# 8.5 tk::frame $top.ft1.f -width 2 -height 2 -bg lightgray pack $top.ft1.tl -side left -fill y pack $top.ft1.f -side left -fill y pack $top.ft1.tt -side right -fill both -expand 1 scrollbar $top.sby -orient vertical scrollbar $top.sbx1 -orient horizontal -command [list $top.ft1.tt xview] set ::widgets($top,wLine1) $top.ft1.tl set ::widgets($top,wDiff1) $top.ft1.tt ttk::frame $top.ft2 -borderwidth 2 -relief sunken text $top.ft2.tl -height $Pref(lines) -width 5 -wrap none \ -font myfont -borderwidth 0 -padx 0 -highlightthickness 0 \ -takefocus 0 text $top.ft2.tt -height $Pref(lines) -width $Pref(linewidth) -wrap none \ -xscrollcommand [list $top.sbx2 set] \ -font myfont -borderwidth 0 -padx 1 \ -highlightthickness 0 |
︙ | ︙ | |||
2876 2877 2878 2879 2880 2881 2882 | array set TmpPref [array get Pref] destroy .pr toplevel .pr wm title .pr "Eskil Preferences" | | | | | | | | | | | | | | | | | | 2797 2798 2799 2800 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 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 | array set TmpPref [array get Pref] destroy .pr toplevel .pr 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::entry .pr.fc.e1 -textvariable "TmpPref(colorchange)" -width 10 ttk::entry .pr.fc.e2 -textvariable "TmpPref(colornew1)" -width 10 ttk::entry .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::entry .pr.fc.e4 -textvariable "TmpPref(bgchange)" -width 10 ttk::entry .pr.fc.e5 -textvariable "TmpPref(bgnew1)" -width 10 ttk::entry .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 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) \ -background $TmpPref(bgnew1) .pr.fc.t3 tag configure new2 -foreground $TmpPref(colornew2) \ -background $TmpPref(bgnew2) .pr.fc.t1 insert end "Changed text" change .pr.fc.t2 insert end "Deleted text" new1 .pr.fc.t3 insert end "Added text" new2 .pr.fc.t1 configure -state disabled .pr.fc.t2 configure -state disabled .pr.fc.t3 configure -state disabled ttk::button .pr.b1 -text "Apply" -command applyPref ttk::button .pr.b2 -text "Test" -command testColor ttk::button .pr.b3 -text "Close" -command {destroy .pr} grid .pr.fc.l1 .pr.fc.l2 x .pr.fc.l3 x -row 0 -sticky ew -padx 1 -pady 1 grid .pr.fc.t1 .pr.fc.e1 .pr.fc.b1 .pr.fc.e4 .pr.fc.b4 -row 1 \ -sticky nsew -padx 1 -pady 1 grid .pr.fc.t2 .pr.fc.e2 .pr.fc.b2 .pr.fc.e5 .pr.fc.b5 -row 2 \ -sticky nsew -padx 1 -pady 1 grid .pr.fc.t3 .pr.fc.e3 .pr.fc.b3 .pr.fc.e6 .pr.fc.b6 -row 3 \ |
︙ | ︙ | |||
2986 2987 2988 2989 2990 2991 2992 | pack .fo.ltmp -padx {10 50} -pady {10 50} update catch {font delete tmpfont} font create tmpfont array set TmpPref [array get Pref] | | | | | | | | 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 2937 2938 2939 | pack .fo.ltmp -padx {10 50} -pady {10 50} update catch {font delete tmpfont} font create tmpfont array set TmpPref [array get Pref] ttk::labelframe .fo.lf -text "Family" -padding 3 set lb [Scroll y listbox .fo.lf.lb -width 15 -height 10 \ -exportselection no -selectmode single] bind $lb <<ListboxSelect>> [list exampleFont $lb] pack .fo.lf.lb -fill both -expand 1 ttk::labelframe .fo.ls -text "Size" -padding 3 spinbox .fo.ls.sp -from 1 -to 30 -increment 1 -width 3 -state readonly \ -textvariable TmpPref(fontsize) -command [list exampleFont $lb] pack .fo.ls.sp -fill both -expand 1 ttk::label .fo.le -text "Example\n0Ooi1Il" -anchor w -font tmpfont \ -width 1 -justify left if {![info exists ::diff(fixedfont)]} {set ::diff(fixedfont) 1} ttk::checkbutton .fo.cb -text "Fixed" -variable ::diff(fixedfont) \ -command [list UpdateFontBox $lb] ttk::button .fo.bo -text "Ok" -command "applyFont $lb ; destroy .fo" ttk::button .fo.ba -text "Apply" -command "applyFont $lb" ttk::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 |
︙ | ︙ | |||
3095 3096 3097 3098 3099 3100 3101 | $ok configure -state normal } proc AddPrefRegsub {top parent} { for {set t 1} {[winfo exists $parent.fr$t]} {incr t} { #Empty } | | | | | 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 | $ok configure -state normal } 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::entry $w.e1 -textvariable ::diff($top,prefregexp$t) -width 60 ttk::label $w.l2 -text "Subst:" -anchor "w" ttk::entry $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 |
︙ | ︙ | |||
3126 3127 3128 3129 3130 3131 3132 | raise $w focus $w } else { toplevel $w -padx 3 -pady 3 wm title $w "Preferences: Preprocess" } | | | | | | | | | 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 | raise $w focus $w } else { toplevel $w -padx 3 -pady 3 wm title $w "Preferences: Preprocess" } ttk::button $w.b -text "Add" -command [list AddPrefRegsub $top $w] # Result example part if {![info exists ::diff($top,prefregexa)]} { 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::entry $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::entry $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 grid $w.res.l6 $w.res.e6 -sticky we -padx 3 -pady 3 grid columnconfigure $w.res 1 -weight 1 # Buttons ttk::frame $w.fb -padding 3 ttk::button $w.fb.b1 -text "Ok" -command [list EditPrefRegsubOk $top $w] ttk::button $w.fb.b2 -text "Cancel" -command [list destroy $w] set ::widgets($top,prefRegsubOk) $w.fb.b1 grid $w.fb.b1 x $w.fb.b2 -sticky we grid columnconfigure $w.fb {0 2} -uniform a grid columnconfigure $w.fb 1 -weight 1 # Top layout |
︙ | ︙ | |||
3725 3726 3727 3728 3729 3730 3731 | # Directory diff options set Pref(dir,comparelevel) 1 set Pref(dir,ignorekey) 0 set Pref(dir,incfiles) "" set Pref(dir,exfiles) "*.o" set Pref(dir,incdirs) "" | | | 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 | # Directory diff options set Pref(dir,comparelevel) 1 set Pref(dir,ignorekey) 0 set Pref(dir,incfiles) "" set Pref(dir,exfiles) "*.o" set Pref(dir,incdirs) "" set Pref(dir,exdirs) "RCS CVS .git .svn .hg" set Pref(dir,onlyrev) 0 # Backward compatibilty option set Pref(onlydiffs) -1 set ::diff(filter) "" |
︙ | ︙ |
Changes to src/help.tcl.
︙ | ︙ | |||
31 32 33 34 35 36 37 | } destroy $top.nui toplevel $top.nui wm transient $top.nui $top wm geometry $top.nui +400+400 wm title $top.nui "" | | | > | > > > > > > > > > > > > > > > > > > > | | 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 | } destroy $top.nui toplevel $top.nui wm transient $top.nui $top wm geometry $top.nui +400+400 wm title $top.nui "" ttk::label $top.nui.l -image nuisance pack $top.nui.l wm protocol $top.nui WM_DELETE_WINDOW [list destroy $top.nui2 $top.nui] update destroy $top.nui2 toplevel $top.nui2 -bg yellow wm transient $top.nui2 $top.nui wm overrideredirect $top.nui2 1 wm title $top.nui2 "" ttk::label $top.nui2.l -text "$str\nDo you want help?" -justify left \ -bg yellow ttk::button $top.nui2.b -text "No, get out of my face!" \ -command [list destroy $top.nui2 $top.nui] -bg yellow pack $top.nui2.l $top.nui2.b -side "top" -fill x wm geometry $top.nui2 +[expr {405 + [winfo width $top.nui]}]+400 } # A simple window for displaying e.g. help. # Returns the frame where things can be put. proc helpWin {w title} { destroy $w toplevel $w -padx 2 -pady 2 wm title $w $title bind $w <Key-Return> [list destroy $w] bind $w <Key-Escape> [list destroy $w] ttk::frame $w.f ttk::button $w.b -text "Close" -command [list destroy $w] -width 10 \ -default active pack $w.b -side bottom -pady 2 pack $w.f -side top -expand y -fill both -padx 2 -pady 2 focus $w return $w.f } proc makeAboutWin {} { global diffver set w [helpWin .ab "About Eskil"] set bg [ttk::style configure . -background] text $w.t -width 45 -height 11 -wrap none -relief flat \ -bg $bg pack $w.t -side top -expand y -fill both $w.t insert end "A graphical frontend to diff\n\n" $w.t insert end "$diffver\n\n" $w.t insert end "Made by Peter Spjuth\n" $w.t insert end "E-Mail: peter.spjuth@space.se\n" $w.t insert end "\nURL: http://eskil.berlios.de\n" |
︙ | ︙ |
Changes to src/merge.tcl.
︙ | ︙ | |||
270 271 272 273 274 275 276 | toplevel $w } else { eval destroy [winfo children $w] } wm title $w "Merge result" | | | | | | | | | | | | | | | 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 | toplevel $w } else { eval destroy [winfo children $w] } wm title $w "Merge result" ttk::frame $w.f ttk::radiobutton $w.f.rb1 -text "LR" -value 12 \ -variable diff($top,curMergeSel) \ -command "selectMerge $top" ttk::radiobutton $w.f.rb2 -text "L" -value 1 \ -variable diff($top,curMergeSel) \ -command "selectMerge $top" ttk::radiobutton $w.f.rb3 -text "R" -value 2 \ -variable diff($top,curMergeSel) \ -command "selectMerge $top" ttk::radiobutton $w.f.rb4 -text "RL" -value 21 \ -variable diff($top,curMergeSel) \ -command "selectMerge $top" bind $w <Key-Left> "focus $w; set diff($top,curMergeSel) 1; selectMerge $top" bind $w <Key-Right> "focus $w; set diff($top,curMergeSel) 2; selectMerge $top" ttk::button $w.f.bl -text "All L" -command "selectMergeAll $top 1" ttk::button $w.f.br -text "All R" -command "selectMergeAll $top 2" ttk::button $w.f.b1 -text "Prev" -command "nextMerge $top -1" ttk::button $w.f.b2 -text "Next" -command "nextMerge $top 1" bind $w <Key-Down> "focus $w ; nextMerge $top 1" bind $w <Key-Up> "focus $w ; nextMerge $top -1" bind $w <Shift-Key-Down> "focus $w ; nextMerge $top 10" bind $w <Shift-Key-Up> "focus $w ; nextMerge $top -10" ttk::button $w.f.bs -text "Save" -command "saveMerge $top" ttk::button $w.f.bq -text "Close" -command "closeMerge $top" wm protocol $w WM_DELETE_WINDOW "closeMerge $top" grid $w.f.rb1 $w.f.rb2 $w.f.rb3 $w.f.rb4 x $w.f.b1 $w.f.b2 x \ $w.f.bl $w.f.br x x x $w.f.bs $w.f.bq -sticky we -padx 1 grid columnconfigure $w.f {4 7 10 12} -minsize 10 grid columnconfigure $w.f 10 -weight 1 grid columnconfigure $w.f {0 1 2 3} -uniform a grid columnconfigure $w.f {5 6 8 9} -uniform b grid columnconfigure $w.f {11 13 14} -uniform c if {$::diff($top,mode) eq "conflict"} { ttk::checkbutton $w.f.bm -text "Pure" -variable diff($top,modetype) \ -onvalue "Pure" -offvalue "" -command {doDiff} grid $w.f.bm -row 0 -column 11 } text $w.t -width 80 -height 20 -xscrollcommand "$w.sbx set" \ -yscrollcommand "$w.sby set" -font myfont scrollbar $w.sbx -orient horizontal -command "$w.t xview" |
︙ | ︙ |
Changes to src/print.tcl.
︙ | ︙ | |||
340 341 342 343 344 345 346 | # Finished normalCursor $top if {!$pdfprint && !$quiet} { destroy .dp toplevel .dp wm title .dp "Eskil Print" | | | > | 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 | # Finished normalCursor $top if {!$pdfprint && !$quiet} { destroy .dp toplevel .dp wm title .dp "Eskil Print" ttk::button .dp.b -text "Close" -command {destroy .dp} ttk::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 pack .dp.l -side "top" |
︙ | ︙ | |||
418 419 420 421 422 423 424 | return } destroy .pr toplevel .pr wm title .pr "Print diffs" | | | | | | | > | > | > | > | | > | > | | | 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 | return } destroy .pr toplevel .pr wm title .pr "Print diffs" ttk::label .pr.l1 -justify left -anchor w \ -text "The print function is just on an\ experimental level. It will use 'enscript' to write a postcript\ file \"eskil.ps\" in your home directory." ttk::label .pr.l2 -justify left -anchor w \ -text "Below you can adjust the gray scale\ levels that are used on the background to mark changes.\ The first value is used for changed text. The second for\ new/deleted text." .pr.l1 configure -wraplength 400 .pr.l2 configure -wraplength 400 ttk::scale .pr.s1 -orient horizontal -from 0.0 \ -to 1.0 -variable Pref(grayLevel1) ttk::scale .pr.s2 -orient horizontal -from 0.0 \ -to 1.0 -variable Pref(grayLevel2) ttk::frame .pr.f ttk::radiobutton .pr.r1 -text "No Syntax" -variable diff(prettyPrint) \ -value "" ttk::radiobutton .pr.r2 -text "VHDL" -variable diff(prettyPrint) \ -value "vhdl" ttk::radiobutton .pr.r3 -text "Tcl" -variable diff(prettyPrint) \ -value "tcl" ttk::radiobutton .pr.r4 -text "C" -variable diff(prettyPrint) \ -value "c" ttk::frame .pr.fs ttk::radiobutton .pr.fs.r1 -text "80 char" -variable Pref(wideLines) \ -value 0 ttk::radiobutton .pr.fs.r2 -text "95 char" -variable Pref(wideLines) \ -value 1 pack .pr.fs.r1 .pr.fs.r2 -side left -padx 10 ttk::button .pr.b1 -text "Print to File" \ -command "destroy .pr; update; PrintDiffs $top" ttk::button .pr.b2 -text "Cancel" -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 grid .pr.fs - - -sticky we |
︙ | ︙ | |||
502 503 504 505 506 507 508 | return } destroy .pr toplevel .pr -padx 3 -pady 3 wm title .pr "Print diffs to PDF" | | | | | | | | | | | | | 509 510 511 512 513 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 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 | return } destroy .pr toplevel .pr -padx 3 -pady 3 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::entry .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::entry .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" } ttk::frame .pr.fb ttk::button .pr.b1 -text "Print to File" \ -command "destroy .pr; update; PrintDiffs $top 0 1" ttk::button .pr.b2 -text "Cancel" -command {destroy .pr} pack .pr.b1 -in .pr.fb -side left -padx 3 -pady 3 -ipadx 5 pack .pr.b2 -in .pr.fb -side right -padx 3 -pady 3 -ipadx 5 grid .pr.hsl .pr.hss -sticky we -padx 3 -pady 3 grid .pr.cll .pr.cle .pr.clf -sticky we -padx 3 -pady 3 grid .pr.fnl .pr.fne - .pr.fnb -sticky we -padx 3 -pady 3 grid .pr.fb - - - -sticky we -padx 3 -pady 3 grid columnconfigure .pr 2 -weight 1 } |
Changes to src/registry.tcl.
︙ | ︙ | |||
22 23 24 25 26 27 28 | # $Revision$ #---------------------------------------------------------------------- proc MakeRegistryFrame {w label key newvalue} { set old {} catch {set old [registry get $key {}]} | | | | | | | | | | | 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | # $Revision$ #---------------------------------------------------------------------- proc MakeRegistryFrame {w label key newvalue} { set old {} catch {set old [registry get $key {}]} set l [ttk::labelframe $w -text $label -padding 4] ttk::label $l.key1 -text "Key:" ttk::label $l.key2 -text $key ttk::label $l.old1 -text "Old value:" ttk::label $l.old2 -text $old ttk::label $l.new1 -text "New value:" ttk::label $l.new2 -text $newvalue ttk::button $l.change -text "Change" -width 10 -command \ "[list registry set $key {} $newvalue] ; \ [list $l.change configure -state disabled]" ttk::button $l.delete -text "Delete" -width 10 -command \ "[list registry delete $key] ; \ [list $l.delete configure -state disabled]" if {[string equal $newvalue $old]} { $l.change configure -state disabled } if {[string equal "" $old]} { $l.delete configure -state disabled |
︙ | ︙ | |||
125 126 127 128 129 130 131 | 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 } | | | | 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 | 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 } ttk::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] } # Some notes about how to get PDF info from registry. # Inended for future use when PDF printing is supported. |
︙ | ︙ |
Changes to src/rev.tcl.
︙ | ︙ | |||
580 581 582 583 584 585 586 | text $w.t -width 70 -height 10 if {!$clean && [info exists ::diff(logdialog)]} { $w.t insert end $::diff(logdialog) $w.t tag add sel 1.0 end-1c $w.t mark set insert 1.0 } | | | > | 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 | text $w.t -width 70 -height 10 if {!$clean && [info exists ::diff(logdialog)]} { $w.t insert end $::diff(logdialog) $w.t tag add sel 1.0 end-1c $w.t mark set insert 1.0 } ttk::button $w.ok -width 10 -text "Commit" -underline 1 \ -command "set ::diff($top,logdialogok) 1 ; \ set ::diff(logdialog) \[$w.t get 1.0 end\] ; \ destroy $w" ttk::button $w.ca -width 10 -text "Cancel" -command "destroy $w" \ -underline 0 bind $w <Alt-o> [list $w.ok invoke]\;break bind $w <Alt-c> [list destroy $w]\;break bind $w <Key-Escape> [list destroy $w]\;break grid $w.t - -sticky news -padx 3 -pady 3 grid $w.ok $w.ca -padx 3 -pady 3 tkwait visibility $w |
︙ | ︙ |