diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-07-10 07:04:29 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-07-10 07:04:29 (GMT) |
commit | 8a4797c9a16ff548b9d7a02b28ac8df76bdb2ff0 (patch) | |
tree | c6598344952695d555c707c547fb77fe6c119688 /library/bgerror.tcl | |
parent | 3018d78340026597655745f383e8f4c2e4e9505d (diff) | |
download | tk-8a4797c9a16ff548b9d7a02b28ac8df76bdb2ff0.zip tk-8a4797c9a16ff548b9d7a02b28ac8df76bdb2ff0.tar.gz tk-8a4797c9a16ff548b9d7a02b28ac8df76bdb2ff0.tar.bz2 |
Minor bindings cleanup. Some removal of "expr" when we can do without it. Some KeyPress -> Key changes (which are synonymes). Some implicit <Button-1> specifications in stead of simply <1> (making clear this is not a binding to the "1" key).
Diffstat (limited to 'library/bgerror.tcl')
-rw-r--r-- | library/bgerror.tcl | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/library/bgerror.tcl b/library/bgerror.tcl index 8421924..fe8dfe0 100644 --- a/library/bgerror.tcl +++ b/library/bgerror.tcl @@ -41,7 +41,7 @@ proc ::tk::dialog::error::Details {} { set w .bgerrorDialog set caption [option get $w.function text {}] set command [option get $w.function command {}] - if { ($caption eq "") || ($command eq "") } { + if {($caption eq "") || ($command eq "")} { grid forget $w.function } lappend command [$w.top.info.text get 1.0 end-1c] @@ -50,7 +50,7 @@ proc ::tk::dialog::error::Details {} { } proc ::tk::dialog::error::SaveToLog {text} { - if { $::tcl_platform(platform) eq "windows" } { + if {$::tcl_platform(platform) eq "windows"} { set allFiles *.* } else { set allFiles * @@ -129,11 +129,11 @@ proc ::tk::dialog::error::bgerror {err {flag 1}} { set lines 0 set maxLine 45 foreach line [split $err \n] { - if { [string length $line] > $maxLine } { - append displayedErr "[string range $line 0 [expr {$maxLine-3}]]..." + if {[string length $line] > $maxLine} { + append displayedErr "[string range $line 0 $maxLine-3]..." break } - if { $lines > 4 } { + if {$lines > 4} { append displayedErr "..." break } else { @@ -182,7 +182,7 @@ proc ::tk::dialog::error::bgerror {err {flag 1}} { pack $W.text -side left -expand yes -fill both $W.text insert 0.0 "$err\n$info" $W.text mark set insert 0.0 - bind $W.text <ButtonPress-1> { focus %W } + bind $W.text <Button-1> {focus %W} $W.text configure -state disabled # 2. Fill the top part with bitmap and message |