Index: statusbar.tcl
===================================================================
RCS file: /cvsroot/tcllib/bwidget/statusbar.tcl,v
retrieving revision 1.8
diff -r1.8 statusbar.tcl
290c290
<     variable _widget
---
> 	variable _widget
292,313c292
<     set destroy [string equal [lindex $args 0] "-destroy"]
<     if {$destroy} {
< 	set args [lrange $args 1 end]
<     }
<     foreach w $args {
< 	set idx [lsearch -exact $_widget($path,items) $w]
< 	if {$idx == -1 || ![winfo exists $w]} {
< 	    # ignore unknown or non-widget items (like our separators)
< 	    continue
< 	}
< 	# separator is always previous item
< 	set sidx [expr {$idx - 1}]
< 	set sep  [lindex $_widget($path,items) $sidx]
< 	if {[string match .* $sep]} {
< 	    # not one of our separators
< 	    incr sidx
< 	} else {
< 	    # destroy separator too
< 	    set sep $path.sbar.$sep
< 	    grid forget $sep
< 	    destroy $sep
< 	}
---
> 	set destroy [string equal [lindex $args 0] "-destroy"]
315,317c294,331
< 	    destroy $w
< 	} else {
< 	    grid forget $w
---
> 		set args [lrange $args 1 end]
> 	}
> 	foreach w $args {
> 		set idx [lsearch -exact $_widget($path,items) $w]
> 		if {$idx == -1 || ![winfo exists $w]} {
> 			# ignore unknown or non-widget items (like our separators)
> 			continue
> 		}
> 		# separator is always previous item
> 		set sidx [expr {$idx - 1}]
> 		set sep [lindex $_widget($path,items) $sidx]
> 		if {[string match .* $sep]} {
> 			# not one of our separators
> 			incr sidx
> 		} else {
> 			# destroy separator too
> 			if {$sep ne ""} {
> 				set sep $path.sbar.$sep
> 				grid forget $sep
> 				destroy $sep
> 			}
> 		}
> 		if {$destroy} {
> 			destroy $w
> 		} else {
> 			grid forget $w
> 		}
> 		set _widget($path,items) [lreplace $_widget($path,items) $sidx $idx]
> 		if {$idx == 0} {
> 			# seperator of next item is no longer necessary
> 			set sep [lindex $_widget($path,items) $idx]
> 			if {$sep ne ""} {
> 				set sep $path.sbar.$sep
> 				grid forget $sep
> 				destroy $sep
> 				set _widget($path,items) [lreplace $_widget($path,items) $idx $idx]
> 			}
> 		}
319,320d332
< 	set _widget($path,items) [lreplace $_widget($path,items) $sidx $idx]
<     }
