diff options
-rw-r--r-- | library/bgerror.tcl | 10 | ||||
-rw-r--r-- | library/entry.tcl | 16 | ||||
-rw-r--r-- | library/tearoff.tcl | 2 |
3 files changed, 14 insertions, 14 deletions
diff --git a/library/bgerror.tcl b/library/bgerror.tcl index b000d91..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 } { + 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 <Button-1> { focus %W } + bind $W.text <Button-1> {focus %W} $W.text configure -state disabled # 2. Fill the top part with bitmap and message diff --git a/library/entry.tcl b/library/entry.tcl index a2b4465..6539af7 100644 --- a/library/entry.tcl +++ b/library/entry.tcl @@ -58,7 +58,7 @@ bind Entry <<Paste>> { } bind Entry <<Clear>> { # ignore if there is no selection - catch { %W delete sel.first sel.last } + catch {%W delete sel.first sel.last} } bind Entry <<PasteSelection>> { if {$tk_strictMotif || ![info exists tk::Priv(mouseMoved)] @@ -119,17 +119,17 @@ bind Entry <Control-Button-1> { } bind Entry <<PrevChar>> { - tk::EntrySetCursor %W [expr {[%W index insert] - 1}] + tk::EntrySetCursor %W [expr {[%W index insert]-1}] } bind Entry <<NextChar>> { - tk::EntrySetCursor %W [expr {[%W index insert] + 1}] + tk::EntrySetCursor %W [expr {[%W index insert]+1}] } bind Entry <<SelectPrevChar>> { - tk::EntryKeySelect %W [expr {[%W index insert] - 1}] + tk::EntryKeySelect %W [expr {[%W index insert]-1}] tk::EntrySeeInsert %W } bind Entry <<SelectNextChar>> { - tk::EntryKeySelect %W [expr {[%W index insert] + 1}] + tk::EntryKeySelect %W [expr {[%W index insert]+1}] tk::EntrySeeInsert %W } bind Entry <<PrevWord>> { @@ -278,7 +278,7 @@ bind Entry <<TkStartIMEMarkedText>> { dict set ::tk::Priv(IMETextMark) "%W" [%W index insert] } bind Entry <<TkEndIMEMarkedText>> { - if { [catch {dict get $::tk::Priv(IMETextMark) "%W"} mark] } { + if {[catch {dict get $::tk::Priv(IMETextMark) "%W"} mark]} { bell } else { %W selection range $mark insert @@ -520,7 +520,7 @@ proc ::tk::EntryBackspace w { } else { set x [$w index insert] if {$x > 0} { - $w delete [expr {$x - 1}] + $w delete [expr {$x-1}] } if {[$w index @0] >= [$w index insert]} { set range [$w xview] @@ -660,7 +660,7 @@ proc ::tk::EntryScanMark {w x} { proc ::tk::EntryScanDrag {w x} { # Make sure these exist, as some weird situations can trigger the # motion binding without the initial press. [Bug #220269] - if {![info exists ::tk::Priv(x)]} { set ::tk::Priv(x) $x } + if {![info exists ::tk::Priv(x)]} {set ::tk::Priv(x) $x} # allow for a delta if {abs($x-$::tk::Priv(x)) > 2} { set ::tk::Priv(mouseMoved) 1 diff --git a/library/tearoff.tcl b/library/tearoff.tcl index 7954ba0..4c8b404 100644 --- a/library/tearoff.tcl +++ b/library/tearoff.tcl @@ -39,7 +39,7 @@ proc ::tk::TearOffMenu {w {x 0} {y 0}} { # Shift by height of tearoff entry minus height of window titlebar catch {incr y [expr {[$w yposition 1] - 16}]} # Avoid the native menu bar which sits on top of everything. - if {$y < 22} { set y 22 } + if {$y < 22} {set y 22} } } |