From 31fda43dcb996ed7bc8fe7e7cf89f88a34ce364e Mon Sep 17 00:00:00 2001 From: patthoyts Date: Fri, 17 Mar 2006 10:50:09 +0000 Subject: bug #1451587: avoid using abbreviated sub-commands in core scripts as this can cause problems with mega-widget libraries like snit. --- ChangeLog | 9 +++++++++ library/clrpick.tcl | 6 +++--- library/palette.tcl | 4 ++-- library/scale.tcl | 6 +++--- library/scrlbar.tcl | 6 +++--- library/tkfbox.tcl | 48 ++++++++++++++++++++++++------------------------ library/xmfbox.tcl | 14 +++++++------- 7 files changed, 51 insertions(+), 42 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5158a5f..0520942 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2006-03-17 Pat Thoyts + + * library/clrpick.tcl: bug #1451587: avoid using abbreviated + * library/palette.tcl: sub-commands in core scripts as this + * library/scale.tcl: can cause problems with mega-widget + * library/scrlbar.tcl: libraries like snit. + * library/tkfbox.tcl: + * library/xmfbox.tcl: + 2006-03-16 Donal K. Fellows * library/msgs/pt.msg: Messages for Portuguese (strictly just for diff --git a/library/clrpick.tcl b/library/clrpick.tcl index c154c8b..ac47150 100644 --- a/library/clrpick.tcl +++ b/library/clrpick.tcl @@ -3,7 +3,7 @@ # Color selection dialog for platforms that do not support a # standard color selection dialog. # -# RCS: @(#) $Id: clrpick.tcl,v 1.20.2.1 2006/01/25 18:21:41 dgp Exp $ +# RCS: @(#) $Id: clrpick.tcl,v 1.20.2.2 2006/03/17 10:50:11 patthoyts Exp $ # # Copyright (c) 1996 Sun Microsystems, Inc. # @@ -667,7 +667,7 @@ proc ::tk::dialog::color::HandleRGBEntry {w} { proc ::tk::dialog::color::EnterColorBar {w color} { upvar ::tk::dialog::color::[winfo name $w] data - $data($color,sel) itemconfig $data($color,index) -fill red + $data($color,sel) itemconfigure $data($color,index) -fill red } # mouse leaves enters a color bar @@ -675,7 +675,7 @@ proc ::tk::dialog::color::EnterColorBar {w color} { proc ::tk::dialog::color::LeaveColorBar {w color} { upvar ::tk::dialog::color::[winfo name $w] data - $data($color,sel) itemconfig $data($color,index) -fill black + $data($color,sel) itemconfigure $data($color,index) -fill black } # user hits OK button diff --git a/library/palette.tcl b/library/palette.tcl index 05d59e7..c53fad5 100644 --- a/library/palette.tcl +++ b/library/palette.tcl @@ -3,7 +3,7 @@ # This file contains procedures that change the color palette used # by Tk. # -# RCS: @(#) $Id: palette.tcl,v 1.8.2.1 2006/01/25 18:21:41 dgp Exp $ +# RCS: @(#) $Id: palette.tcl,v 1.8.2.2 2006/03/17 10:50:11 patthoyts Exp $ # # Copyright (c) 1995-1997 Sun Microsystems, Inc. # @@ -173,7 +173,7 @@ proc ::tk::RecolorTree {w colors} { set option -[string tolower $dbOption] set class [string replace $dbOption 0 0 [string toupper \ [string index $dbOption 0]]] - if {![catch {$w config $option} value]} { + if {![catch {$w configure $option} value]} { # if the option database has a preference for this # dbOption, then use it, otherwise use the defaults # for the widget. diff --git a/library/scale.tcl b/library/scale.tcl index 54827f9..4cb0a3f 100644 --- a/library/scale.tcl +++ b/library/scale.tcl @@ -3,7 +3,7 @@ # This file defines the default bindings for Tk scale widgets and provides # procedures that help in implementing the bindings. # -# RCS: @(#) $Id: scale.tcl,v 1.9.2.4 2006/01/25 18:21:41 dgp Exp $ +# RCS: @(#) $Id: scale.tcl,v 1.9.2.5 2006/03/17 10:50:11 patthoyts Exp $ # # Copyright (c) 1994 The Regents of the University of California. # Copyright (c) 1994-1995 Sun Microsystems, Inc. @@ -21,7 +21,7 @@ bind Scale { if {$tk_strictMotif} { set tk::Priv(activeBg) [%W cget -activebackground] - %W config -activebackground [%W cget -background] + %W configure -activebackground [%W cget -background] } tk::ScaleActivate %W %x %y } @@ -30,7 +30,7 @@ bind Scale { } bind Scale { if {$tk_strictMotif} { - %W config -activebackground $tk::Priv(activeBg) + %W configure -activebackground $tk::Priv(activeBg) } if {[%W cget -state] eq "active"} { %W configure -state normal diff --git a/library/scrlbar.tcl b/library/scrlbar.tcl index 516fb38..bec329d 100644 --- a/library/scrlbar.tcl +++ b/library/scrlbar.tcl @@ -3,7 +3,7 @@ # This file defines the default bindings for Tk scrollbar widgets. # It also provides procedures that help in implementing the bindings. # -# RCS: @(#) $Id: scrlbar.tcl,v 1.10.2.2 2006/01/25 18:21:41 dgp Exp $ +# RCS: @(#) $Id: scrlbar.tcl,v 1.10.2.3 2006/03/17 10:50:11 patthoyts Exp $ # # Copyright (c) 1994 The Regents of the University of California. # Copyright (c) 1994-1996 Sun Microsystems, Inc. @@ -22,7 +22,7 @@ if {[tk windowingsystem] eq "x11"} { bind Scrollbar { if {$tk_strictMotif} { set tk::Priv(activeBg) [%W cget -activebackground] - %W config -activebackground [%W cget -background] + %W configure -activebackground [%W cget -background] } %W activate [%W identify %x %y] } @@ -37,7 +37,7 @@ bind Scrollbar { bind Scrollbar { if {$tk_strictMotif && [info exists tk::Priv(activeBg)]} { - %W config -activebackground $tk::Priv(activeBg) + %W configure -activebackground $tk::Priv(activeBg) } %W activate {} } diff --git a/library/tkfbox.tcl b/library/tkfbox.tcl index 02bea96..a5799fa 100644 --- a/library/tkfbox.tcl +++ b/library/tkfbox.tcl @@ -11,7 +11,7 @@ # files by clicking on the file icons or by entering a filename # in the "Filename:" entry. # -# RCS: @(#) $Id: tkfbox.tcl,v 1.38.2.10 2006/01/25 18:21:41 dgp Exp $ +# RCS: @(#) $Id: tkfbox.tcl,v 1.38.2.11 2006/03/17 10:50:11 patthoyts Exp $ # # Copyright (c) 1994-1998 Sun Microsystems, Inc. # @@ -224,8 +224,8 @@ proc ::tk::IconList_Create {w} { pack $data(sbar) -side bottom -fill x -padx 2 pack $data(canvas) -expand yes -fill both - $data(sbar) config -command [list $data(canvas) xview] - $data(canvas) config -xscrollcommand [list $data(sbar) set] + $data(sbar) configure -command [list $data(canvas) xview] + $data(canvas) configure -xscrollcommand [list $data(sbar) set] # Initializes the max icon/text width and height and other variables # @@ -390,7 +390,7 @@ proc ::tk::IconList_Arrange {w} { if {![info exists data(list)]} { if {[info exists data(canvas)] && [winfo exists $data(canvas)]} { set data(noScroll) 1 - $data(sbar) config -command "" + $data(sbar) configure -command "" } return } @@ -446,13 +446,13 @@ proc ::tk::IconList_Arrange {w} { } if {$sW < $W} { - $data(canvas) config -scrollregion [list $pad $pad $sW $H] - $data(sbar) config -command "" + $data(canvas) configure -scrollregion [list $pad $pad $sW $H] + $data(sbar) configure -command "" $data(canvas) xview moveto 0 set data(noScroll) 1 } else { - $data(canvas) config -scrollregion [list $pad $pad $sW $H] - $data(sbar) config -command [list $data(canvas) xview] + $data(canvas) configure -scrollregion [list $pad $pad $sW $H] + $data(sbar) configure -command [list $data(canvas) xview] set data(noScroll) 0 } @@ -860,12 +860,12 @@ proc ::tk::dialog::file:: {type args} { -command [list ::tk::dialog::file::SetFilter $w $type] } ::tk::dialog::file::SetFilter $w [lindex $data(-filetypes) 0] - $data(typeMenuBtn) config -state normal - $data(typeMenuLab) config -state normal + $data(typeMenuBtn) configure -state normal + $data(typeMenuLab) configure -state normal } else { set data(filter) "*" - $data(typeMenuBtn) config -state disabled -takefocus 0 - $data(typeMenuLab) config -state disabled + $data(typeMenuBtn) configure -state disabled -takefocus 0 + $data(typeMenuLab) configure -state disabled } ::tk::dialog::file::UpdateWhenIdle $w @@ -1023,9 +1023,9 @@ static char updir_bits[] = { 0x10, 0xfe, 0x07, 0x01, 0x10, 0x00, 0x00, 0x01, 0x10, 0x00, 0x00, 0x01, 0xf0, 0xff, 0xff, 0x01};}] } - $data(upBtn) config -image $Priv(updirImage) + $data(upBtn) configure -image $Priv(updirImage) - $f1.menu config -takefocus 1 -highlightthickness 2 + $f1.menu configure -takefocus 1 -highlightthickness 2 pack $data(upBtn) -side right -padx 4 -fill both pack $f1.lab -side left -padx 4 -fill both @@ -1070,7 +1070,7 @@ static char updir_bits[] = { set data(typeMenuBtn) [menubutton $f2.menu -indicatoron 1 \ -menu $f2.menu.m] set data(typeMenu) [menu $data(typeMenuBtn).m -tearoff 0] - $data(typeMenuBtn) config -takefocus 1 -highlightthickness 2 \ + $data(typeMenuBtn) configure -takefocus 1 -highlightthickness 2 \ -relief raised -bd 2 -anchor w bind $data(typeMenuLab) <> [list \ focus $data(typeMenuBtn)] @@ -1125,8 +1125,8 @@ static char updir_bits[] = { # wm protocol $w WM_DELETE_WINDOW [list ::tk::dialog::file::CancelCmd $w] - $data(upBtn) config -command [list ::tk::dialog::file::UpDirCmd $w] - $data(cancelBtn) config -command [list ::tk::dialog::file::CancelCmd $w] + $data(upBtn) configure -command [list ::tk::dialog::file::UpDirCmd $w] + $data(cancelBtn) configure -command [list ::tk::dialog::file::CancelCmd $w] bind $w [list tk::ButtonInvoke $data(cancelBtn)] bind $w [list tk::AltKeyInDialog $w %A] @@ -1134,7 +1134,7 @@ static char updir_bits[] = { # if { $class eq "TkFDialog" } { bind $data(ent) [list ::tk::dialog::file::ActivateEnt $w] - $data(okBtn) config -command [list ::tk::dialog::file::OkCmd $w] + $data(okBtn) configure -command [list ::tk::dialog::file::OkCmd $w] bind $w [format { if {[%s cget -state] eq "normal"} { focus %s @@ -1143,7 +1143,7 @@ static char updir_bits[] = { } else { set okCmd [list ::tk::dialog::file::chooseDir::OkCmd $w] bind $data(ent) $okCmd - $data(okBtn) config -command $okCmd + $data(okBtn) configure -command $okCmd bind $w [list focus $data(ent)] bind $w [list tk::ButtonInvoke $data(okBtn)] } @@ -1253,8 +1253,8 @@ rSASvJTGhnhcV3EJlo3kh53ltF5nAhQAOw==}] # set entCursor [$data(ent) cget -cursor] set dlgCursor [$w cget -cursor] - $data(ent) config -cursor watch - $w config -cursor watch + $data(ent) configure -cursor watch + $w configure -cursor watch update idletasks ::tk::IconList_DeleteAll $data(icons) @@ -1324,8 +1324,8 @@ rSASvJTGhnhcV3EJlo3kh53ltF5nAhQAOw==}] # turn off the busy cursor. # - $data(ent) config -cursor $entCursor - $w config -cursor $dlgCursor + $data(ent) configure -cursor $entCursor + $w configure -cursor $dlgCursor } # ::tk::dialog::file::SetPathSilently -- @@ -1362,7 +1362,7 @@ proc ::tk::dialog::file::SetFilter {w type} { upvar ::tk::$data(icons) icons set data(filter) [lindex $type 1] - $data(typeMenuBtn) config -text [lindex $type 0] -indicatoron 1 + $data(typeMenuBtn) configure -text [lindex $type 0] -indicatoron 1 # If we aren't using a default extension, use the one suppled # by the filter. diff --git a/library/xmfbox.tcl b/library/xmfbox.tcl index 1899a33..953b6e2 100644 --- a/library/xmfbox.tcl +++ b/library/xmfbox.tcl @@ -4,7 +4,7 @@ # Unix platform. This implementation is used only if the # "::tk_strictMotif" flag is set. # -# RCS: @(#) $Id: xmfbox.tcl,v 1.25.2.2 2006/01/25 18:21:41 dgp Exp $ +# RCS: @(#) $Id: xmfbox.tcl,v 1.25.2.3 2006/03/17 10:50:11 patthoyts Exp $ # # Copyright (c) 1996 Sun Microsystems, Inc. # Copyright (c) 1998-2000 Scriptics Corporation @@ -327,9 +327,9 @@ proc ::tk::MotifFDialog_BuildUI {w} { -sticky news grid $f2b -row 0 -column 1 -rowspan 1 -columnspan 1 -padx 4 -pady 4 \ -sticky news - grid rowconfig $f2 0 -minsize 0 -weight 1 - grid columnconfig $f2 0 -minsize 0 -weight 1 - grid columnconfig $f2 1 -minsize 150 -weight 2 + grid rowconfigure $f2 0 -minsize 0 -weight 1 + grid columnconfigure $f2 0 -minsize 0 -weight 1 + grid columnconfigure $f2 1 -minsize 150 -weight 2 # The Filter box # @@ -425,9 +425,9 @@ proc ::tk::MotifFDialog_MakeSList {w f label cmdPrefix} { grid $f.v -row 1 -column 1 -rowspan 1 -columnspan 1 -sticky news grid $f.h -row 2 -column 0 -rowspan 1 -columnspan 1 -sticky news - grid rowconfig $f 0 -weight 0 -minsize 0 - grid rowconfig $f 1 -weight 1 -minsize 0 - grid columnconfig $f 0 -weight 1 -minsize 0 + grid rowconfigure $f 0 -weight 0 -minsize 0 + grid rowconfigure $f 1 -weight 1 -minsize 0 + grid columnconfigure $f 0 -weight 1 -minsize 0 # bindings for the listboxes # -- cgit v0.12