summaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2020-07-10 07:08:23 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2020-07-10 07:08:23 (GMT)
commit11cbe548afc3ebf675fb2de0aa3475a99912ed28 (patch)
tree8e4319c8c76365c85668ddcc35fbd3d4bb990b82 /library
parent09329962c189c0d1906e761169e968afee62158d (diff)
parent8a4797c9a16ff548b9d7a02b28ac8df76bdb2ff0 (diff)
downloadtk-11cbe548afc3ebf675fb2de0aa3475a99912ed28.zip
tk-11cbe548afc3ebf675fb2de0aa3475a99912ed28.tar.gz
tk-11cbe548afc3ebf675fb2de0aa3475a99912ed28.tar.bz2
Merge 8.6
Diffstat (limited to 'library')
-rw-r--r--library/bgerror.tcl10
-rw-r--r--library/entry.tcl16
-rw-r--r--library/tearoff.tcl2
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}
}
}