Eskil

Check-in [63cd9c7aa2]
Login

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

Overview
Comment:Code polish to silence syntax warnings.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 63cd9c7aa2d9018549ac6e90f3eaf9f7f7a9207b
User & Date: peter 2015-02-22 23:46:40.700
Context
2015-02-23
00:41
Prepare changes list check-in: 79267eb485 user: peter tags: trunk
2015-02-22
23:46
Code polish to silence syntax warnings. check-in: 63cd9c7aa2 user: peter tags: trunk
02:36
Handle icons visibly check-in: bc5fab7d78 user: peter tags: trunk
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/debug.tcl.
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76

    if {$p eq ""} {
        set ::ProcEditor(args) ""
        $::ProcEditor(bodyW) delete 1.0 end
        return
    }
    if {$p ne $::ProcEditor(proc)} {
        after idle [list set ::ProcEditor(proc) $p]
        after idle [list $::ProcEditor(procW) selection range insert end]
    }

    after idle ProcEditorSelected
}

proc ProcEditorSelected {} {







|







62
63
64
65
66
67
68
69
70
71
72
73
74
75
76

    if {$p eq ""} {
        set ::ProcEditor(args) ""
        $::ProcEditor(bodyW) delete 1.0 end
        return
    }
    if {$p ne $::ProcEditor(proc)} {
        after idle [list set "::ProcEditor(proc)" $p]
        after idle [list $::ProcEditor(procW) selection range insert end]
    }

    after idle ProcEditorSelected
}

proc ProcEditorSelected {} {
Changes to src/dirdiff.tcl.
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
        #catch {font delete myfont}
        #font create myfont -family $::Pref(fontfamily) -size $::Pref(fontsize)

        ttk::entryX $win.e1 -textvariable dirdiff(leftDir) -width 30
        ttk::button $win.bu1 -image $::img(up) -command [mymethod UpDir 1]
        addBalloon $win.bu1 "Up in left."
        ttk::button $win.bb1 -image $::img(browse) \
                -command "[list BrowseDir dirdiff(leftDir) $win.e1]
                          [mymethod DoDirCompare]"
        addBalloon $win.bb1 "Browse left."
        after 50 [list after idle [list $win.e1 xview end]]
        ttk::entryX $win.e2 -textvariable dirdiff(rightDir) -width 30
        ttk::button $win.bu2 -image $::img(up) -command [mymethod UpDir 2]
        addBalloon $win.bu2 "Up in right."
        ttk::button $win.bb2 -image $::img(browse) \
                -command "[list BrowseDir dirdiff(rightDir) $win.e2]
                          [mymethod DoDirCompare]"
        addBalloon $win.bb2 "Browse right."
        after 50 [list after idle [list $win.e2 xview end]]
        bind $win.e1 <Return> [mymethod DoDirCompare]
        bind $win.e2 <Return> [mymethod DoDirCompare]

        ttk::label $win.sl -anchor w -textvariable [myvar statusVar]







|







|







1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
        #catch {font delete myfont}
        #font create myfont -family $::Pref(fontfamily) -size $::Pref(fontsize)

        ttk::entryX $win.e1 -textvariable dirdiff(leftDir) -width 30
        ttk::button $win.bu1 -image $::img(up) -command [mymethod UpDir 1]
        addBalloon $win.bu1 "Up in left."
        ttk::button $win.bb1 -image $::img(browse) \
                -command "[list BrowseDir "dirdiff(leftDir)" $win.e1]
                          [mymethod DoDirCompare]"
        addBalloon $win.bb1 "Browse left."
        after 50 [list after idle [list $win.e1 xview end]]
        ttk::entryX $win.e2 -textvariable dirdiff(rightDir) -width 30
        ttk::button $win.bu2 -image $::img(up) -command [mymethod UpDir 2]
        addBalloon $win.bu2 "Up in right."
        ttk::button $win.bb2 -image $::img(browse) \
                -command "[list BrowseDir "dirdiff(rightDir)" $win.e2]
                          [mymethod DoDirCompare]"
        addBalloon $win.bb2 "Browse right."
        after 50 [list after idle [list $win.e2 xview end]]
        bind $win.e1 <Return> [mymethod DoDirCompare]
        bind $win.e2 <Return> [mymethod DoDirCompare]

        ttk::label $win.sl -anchor w -textvariable [myvar statusVar]
Changes to src/eskil.syntax.
1
2


3
4
5
6
7
8
9
##nagelfar syntax textSearch::searchMenu x
##nagelfar syntax textSearch::enableSearch x x*


##nagelfar package known textSearch

##nagelfar syntax DiffUtil::LocateDiffExe x
###nagelfar syntax DiffUtil::diffStrings o* x x
##nagelfar package known DiffUtil

##nagelfar syntax dde s x

|
>
>







1
2
3
4
5
6
7
8
9
10
11
##nagelfar syntax textSearch::searchMenu x
##nagelfar syntax textSearch::enableSearch x p*
##nagelfar option textSearch::enableSearch -label
##nagelfar option textSearch::enableSearch\ -label n
##nagelfar package known textSearch

##nagelfar syntax DiffUtil::LocateDiffExe x
###nagelfar syntax DiffUtil::diffStrings o* x x
##nagelfar package known DiffUtil

##nagelfar syntax dde s x
17
18
19
20
21
22
23
24
25
26
27
28




29
30
31
32
33
34
35
##nagelfar package known pstools
##nagelfar package known psballoon

##nagelfar syntax wcb::cancel 0
##nagelfar syntax wcb::callback 4
##nagelfar package known wcb

###nagelfar syntax ttk::entryX x p*
##nagelfar syntax ::tk::GetSelection x x
##nagelfar syntax ::tk::ScrollButton2Down x x x
##nagelfar syntax console x





##nagelfar syntax registry x x x
##nagelfar package known registry

##nagelfar syntax vfs::filesystem s x*
##nagelfar subcmd vfs::filesystem mount posixerror
##nagelfar syntax vfs::filesystem\ mount x x
##nagelfar syntax vfs::filesystem\ posixerror x







<




>
>
>
>







19
20
21
22
23
24
25

26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
##nagelfar package known pstools
##nagelfar package known psballoon

##nagelfar syntax wcb::cancel 0
##nagelfar syntax wcb::callback 4
##nagelfar package known wcb


##nagelfar syntax ::tk::GetSelection x x
##nagelfar syntax ::tk::ScrollButton2Down x x x
##nagelfar syntax console x

##nagelfar syntax fileLabel x p*
##nagelfar option fileLabel -textvariable
##nagelfar option fileLabel\ -textvariable n

##nagelfar syntax registry x x x
##nagelfar package known registry

##nagelfar syntax vfs::filesystem s x*
##nagelfar subcmd vfs::filesystem mount posixerror
##nagelfar syntax vfs::filesystem\ mount x x
##nagelfar syntax vfs::filesystem\ posixerror x
93
94
95
96
97
98
99

100
101
102
103

##nagelfar implicitvarns snit::widget::DirCompareTree self\ _obj,DirCompareTree hull win self tree hsb vsb options AfterId PauseBgProcessing IdleQueue IdleQueueArr leftMark rightMark leftDir rightDir ScheduledRestart img AfterTime

# This is the annotation needed for this object definition

##nagelfar syntax ttk::entryX dc=_obj,ttk::entryX p*
##nagelfar option ttk::entryX -width -textvariable -style

##nagelfar return ttk::entryX _obj,ttk::entryX
##nagelfar subcmd+ _obj,ttk::entryX text newLine

##nagelfar implicitvarns snit::widgetadaptor::ttk::entryX self\ _obj,ttk::entryX hull win self  options







>




98
99
100
101
102
103
104
105
106
107
108
109

##nagelfar implicitvarns snit::widget::DirCompareTree self\ _obj,DirCompareTree hull win self tree hsb vsb options AfterId PauseBgProcessing IdleQueue IdleQueueArr leftMark rightMark leftDir rightDir ScheduledRestart img AfterTime

# This is the annotation needed for this object definition

##nagelfar syntax ttk::entryX dc=_obj,ttk::entryX p*
##nagelfar option ttk::entryX -width -textvariable -style
##nagelfar option ttk::entryX\ -textvariable n
##nagelfar return ttk::entryX _obj,ttk::entryX
##nagelfar subcmd+ _obj,ttk::entryX text newLine

##nagelfar implicitvarns snit::widgetadaptor::ttk::entryX self\ _obj,ttk::entryX hull win self  options
Changes to src/eskil.tcl.
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
    }

    .lpm add command -label $label -command [list hlSeparate $top $n $hl]
    alignMenu .lpm $top $n $x $y

    set ::eskil($top,nopopup) 1
    tk_popup .lpm $X $Y
    after idle [list after 1 [list set ::eskil($top,nopopup) 0]]

    return
}

# This is called when right clicking over the line numbers which are not
# marked for changes
proc rowPopup {w X Y x y} {







|







2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
    }

    .lpm add command -label $label -command [list hlSeparate $top $n $hl]
    alignMenu .lpm $top $n $x $y

    set ::eskil($top,nopopup) 1
    tk_popup .lpm $X $Y
    after idle [list after 1 [list set "::eskil($top,nopopup)" 0]]

    return
}

# This is called when right clicking over the line numbers which are not
# marked for changes
proc rowPopup {w X Y x y} {
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
        # Nothing in the menu
        return
    }
    if {!$tmp1 && $tmp2} {.lpm delete last}

    set ::eskil($top,nopopup) 1
    tk_popup .lpm $X $Y
    after idle [list after 1 [list set ::eskil($top,nopopup) 0]]
}

proc nextHighlight {top} {
    set tag hl$::HighLightCount
    foreach n {1 2} {
        $::widgets($top,wLine$n) tag bind $tag <ButtonPress-3> \
                "hlPopup $top $n $::HighLightCount %X %Y %x %y ; break"







|







2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
        # Nothing in the menu
        return
    }
    if {!$tmp1 && $tmp2} {.lpm delete last}

    set ::eskil($top,nopopup) 1
    tk_popup .lpm $X $Y
    after idle [list after 1 [list set "::eskil($top,nopopup)" 0]]
}

proc nextHighlight {top} {
    set tag hl$::HighLightCount
    foreach n {1 2} {
        $::widgets($top,wLine$n) tag bind $tag <ButtonPress-3> \
                "hlPopup $top $n $::HighLightCount %X %Y %x %y ; break"
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
        # Skip unchanged options.
        if {[info exists ::DefaultPref($i)]} {
            if {$::DefaultPref($i) eq $::Pref($i)} {
                continue
            }
            puts $ch "# $i default : $::DefaultPref($i)"
        }
        puts $ch [list set ::Pref($i) $::Pref($i)]
    }
    close $ch

    tk_messageBox -icon info -title "Saved" -message \
            "Preferences saved to:\n[file nativename $rcfile]"
}








|







4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
        # Skip unchanged options.
        if {[info exists ::DefaultPref($i)]} {
            if {$::DefaultPref($i) eq $::Pref($i)} {
                continue
            }
            puts $ch "# $i default : $::DefaultPref($i)"
        }
        puts $ch [list set "::Pref($i)" $::Pref($i)]
    }
    close $ch

    tk_messageBox -icon info -title "Saved" -message \
            "Preferences saved to:\n[file nativename $rcfile]"
}

Changes to src/merge.tcl.
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
            -yscrollcommand "$w.sby set" -font myfont
    scrollbar $w.sbx -orient horizontal -command "$w.t xview"
    scrollbar $w.sby -orient vertical   -command "$w.t yview"

    bind $w.t <Key-Escape> [list focus $w]

    ttk::label $w.ls -textvariable ::eskil($top,mergeStatus)
    addBalloon $w.ls \[[list set ::eskil($top,mergeAncLines)]\]

    # Prevent toplevel bindings on keys to fire while in the text widget.
    bindtags $w.t [list Text $w.t $w all]
    bind $w.t <Key-Left>  "break"
    bind $w.t <Key-Right> "break"
    bind $w.t <Key-Down>  "break"
    bind $w.t <Key-Up>    "break"







|







468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
            -yscrollcommand "$w.sby set" -font myfont
    scrollbar $w.sbx -orient horizontal -command "$w.t xview"
    scrollbar $w.sby -orient vertical   -command "$w.t yview"

    bind $w.t <Key-Escape> [list focus $w]

    ttk::label $w.ls -textvariable ::eskil($top,mergeStatus)
    addBalloon $w.ls \[[list set "::eskil($top,mergeAncLines)"]\]

    # Prevent toplevel bindings on keys to fire while in the text widget.
    bindtags $w.t [list Text $w.t $w all]
    bind $w.t <Key-Left>  "break"
    bind $w.t <Key-Right> "break"
    bind $w.t <Key-Down>  "break"
    bind $w.t <Key-Up>    "break"