summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorstanton <stanton>1999-01-29 00:34:29 (GMT)
committerstanton <stanton>1999-01-29 00:34:29 (GMT)
commit998addcce72a803065cfee27b0b2766989d01499 (patch)
tree8662f91294e6050caa6af79fd634480c5a1eab4d
parent89aede68cdad0d2c46f898878aaeb6938693dc7b (diff)
downloadtk-998addcce72a803065cfee27b0b2766989d01499.zip
tk-998addcce72a803065cfee27b0b2766989d01499.tar.gz
tk-998addcce72a803065cfee27b0b2766989d01499.tar.bz2
Merged changes from Tk 8.0.5b1
-rw-r--r--ChangeLog5
-rw-r--r--changes11
-rw-r--r--generic/tk.h3
-rw-r--r--generic/tkGrid.c5
-rw-r--r--library/bgerror.tcl5
-rw-r--r--library/tk.tcl3
-rw-r--r--tests/grid.test47
-rw-r--r--tests/main.test3
8 files changed, 52 insertions, 30 deletions
diff --git a/ChangeLog b/ChangeLog
index b4f17b1..adad128 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+1999-1-28 <stanton@GASPODE>
+
+ * generic/tkGrid.c: Fixed bug in "grid forget" that failed to cancel
+ pending idle handlers, resulting in a crash in a few odd cases.
+
1999-01-06 <lfb@JUSTICE>
* generic/tk.h, generic/tkGet.c, generic/tkConfig.c,
diff --git a/changes b/changes
index b786146..8186511 100644
--- a/changes
+++ b/changes
@@ -2,7 +2,7 @@ This file summarizes all changes made to Tk since version 1.0 was
released on March 13, 1991. Changes that aren't backward compatible
are marked specially.
-RCS: @(#) $Id: changes,v 1.1.4.5 1998/12/11 01:31:02 stanton Exp $
+RCS: @(#) $Id: changes,v 1.1.4.6 1999/01/29 00:34:29 stanton Exp $
3/16/91 (bug fix) Modified tkWindow.c to remove Tk's Tcl commands from
the interpreter when the main window is deleted (otherwise there will
@@ -4278,10 +4278,11 @@ format. If you have extensions built with the o32 abi's you will need
to update them to n32 for them to work with Tcl. (RJ)
*** POTENTIAL INCOMPATIBILITY ***
-11/10/98 (feature change) The Macintosh menus will use the Appearance Theme
-backgrounds, separators and menu shape, if Appearance version 1.0.1 or
-greater is installed. The version of Appearance that shipped with MacOS 8.0
-so it will not work with a straight 8.0, but it will with MacOS 8.1 or later. (JI)
+11/10/98 (feature change) The Macintosh menus will use the Appearance
+Theme backgrounds, separators and menu shape, if Appearance version
+1.0.1 or greater is installed. The version of Appearance that shipped
+with MacOS 8.0 so it will not work with a straight 8.0, but it will
+with MacOS 8.1 or later. (JI)
----------------- Released 8.0.4, 11/20/98 -----------------------
diff --git a/generic/tk.h b/generic/tk.h
index 68d2369..04aa2f6 100644
--- a/generic/tk.h
+++ b/generic/tk.h
@@ -7,11 +7,12 @@
* Copyright (c) 1989-1994 The Regents of the University of California.
* Copyright (c) 1994 The Australian National University.
* Copyright (c) 1994-1998 Sun Microsystems, Inc.
+ * Copyright (c) 1998-1999 Scriptics Corporation.
*
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tk.h,v 1.1.4.5 1999/01/07 02:42:48 lfb Exp $
+ * RCS: @(#) $Id: tk.h,v 1.1.4.6 1999/01/29 00:34:31 stanton Exp $
*/
#ifndef _TK
diff --git a/generic/tkGrid.c b/generic/tkGrid.c
index 5184dd0..e096896 100644
--- a/generic/tkGrid.c
+++ b/generic/tkGrid.c
@@ -8,7 +8,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkGrid.c,v 1.1.4.3 1998/12/13 08:16:06 lfb Exp $
+ * RCS: @(#) $Id: tkGrid.c,v 1.1.4.4 1999/01/29 00:34:31 stanton Exp $
*/
#include "tkInt.h"
@@ -434,6 +434,9 @@ Tk_GridCmd(clientData, interp, argc, argv)
slavePtr->padX = slavePtr->padY = 0;
slavePtr->iPadX = slavePtr->iPadY = 0;
slavePtr->doubleBw = 2*Tk_Changes(tkwin)->border_width;
+ if (slavePtr->flags & REQUESTED_RELAYOUT) {
+ Tk_CancelIdleCall(ArrangeGrid, (ClientData) slavePtr);
+ }
slavePtr->flags = 0;
slavePtr->sticky = 0;
}
diff --git a/library/bgerror.tcl b/library/bgerror.tcl
index a863145..e16b682 100644
--- a/library/bgerror.tcl
+++ b/library/bgerror.tcl
@@ -4,7 +4,7 @@
# posts a dialog box with the error message and gives the user a chance
# to see a more detailed stack trace.
#
-# RCS: @(#) $Id: bgerror.tcl,v 1.1.4.2 1998/09/30 02:17:29 stanton Exp $
+# RCS: @(#) $Id: bgerror.tcl,v 1.1.4.3 1999/01/29 00:34:33 stanton Exp $
#
# Copyright (c) 1992-1994 The Regents of the University of California.
# Copyright (c) 1994-1996 Sun Microsystems, Inc.
@@ -35,7 +35,8 @@ proc bgerror err {
# code from the tkerror trial, other ret codes are passed back
# to our caller (tcl background error handler) so the called "tkerror"
# can still use return -code break, to skip remaining messages
- # in the error queue for instance) -- dl
+ # in the error queue for instance)
+
set ret [catch {tkerror $err} msg];
if {$ret != 1} {return -code $ret $msg}
diff --git a/library/tk.tcl b/library/tk.tcl
index bb7c6c6..e88bde1 100644
--- a/library/tk.tcl
+++ b/library/tk.tcl
@@ -3,10 +3,11 @@
# Initialization script normally executed in the interpreter for each
# Tk-based application. Arranges class bindings for widgets.
#
-# RCS: @(#) $Id: tk.tcl,v 1.1.4.3 1998/11/25 21:16:33 stanton Exp $
+# RCS: @(#) $Id: tk.tcl,v 1.1.4.4 1999/01/29 00:34:33 stanton Exp $
#
# Copyright (c) 1992-1994 The Regents of the University of California.
# Copyright (c) 1994-1996 Sun Microsystems, Inc.
+# Copyright (c) 1998-1999 Scriptics Corporation.
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
diff --git a/tests/grid.test b/tests/grid.test
index 7ed0558..74bbb69 100644
--- a/tests/grid.test
+++ b/tests/grid.test
@@ -2,29 +2,16 @@
# of Tk. It is (almost) organized in the standard fashion for Tcl tests.
#
# Copyright (c) 1996 Sun Microsystems, Inc.
+# Copyright (c) 1998-1999 by Scriptics Corporation.
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: grid.test,v 1.1.4.1 1998/09/30 02:18:40 stanton Exp $
+# RCS: @(#) $Id: grid.test,v 1.1.4.2 1999/01/29 00:34:34 stanton Exp $
if {[string compare test [info procs test]] == 1} then \
{source ../tests/defs}
-# Test Arguments:
-# name - Name of test, in the form foo-1.2.
-# description - Short textual description of the test, to
-# help humans understand what it does.
-# constraints - A list of one or more keywords, each of
-# which must be the name of an element in
-# the array "testConfig". If any of these
-# elements is zero, the test is skipped.
-# This argument may be omitted.
-# script - Script to run to carry out the test. It must
-# return a result that can be checked for
-# correctness.
-# answer - Expected result from script.
-
# helper routine to return "." to a sane state after a test
# The variable GRID_VERBOSE can be used to "look" at the result
# of one or all of the tests
@@ -310,18 +297,18 @@ test grid-6.7 {location (y)} {
grid_reset 6.7
test grid-6.8 {location (weights)} {
- frame .f -width 200 -height 100 -highlightthickness 0 -bg red
+ frame .f -width 300 -height 100 -highlightthickness 0 -bg red
frame .a
grid .a
grid .f -in .a
grid rowconfigure .f 0 -weight 1
grid columnconfigure .f 0 -weight 1
grid propagate .a 0
- .a configure -width 110 -height 15
+ .a configure -width 200 -height 15
update
set got ""
set result ""
- for {set y -10} { $y < 120} { incr y} {
+ for {set y -10} { $y < 210} { incr y} {
set a [grid location . $y $y]
if {$a != $got} {
lappend result $y->$a
@@ -329,7 +316,7 @@ test grid-6.8 {location (weights)} {
}
}
set result
-} {{-10->-1 -1} {0->0 0} {16->0 1} {111->1 1}}
+} {{-10->-1 -1} {0->0 0} {16->0 1} {201->1 1}}
grid_reset 6.8
test grid-6.9 {location: check updates pending} {
@@ -1203,3 +1190,25 @@ test grid-16.8 {layout internal constraints} {
}
set a
} {0 30 70 250 280 , 0 30 130 230 260 , 0 30 113 197 280 , 0 30 60 90 120 }
+
+test grid-17.1 {forget and pending idle handlers} {
+ # This test is intended to detect a crash caused by a failure to remove
+ # pending idle handlers when grid forget is invoked.
+
+ toplevel .t
+ frame .t.f
+ label .t.f.l -text foobar
+ grid .t.f.l
+ grid .t.f
+ update
+ grid forget .t.f.l
+ grid forget .t.f
+ destroy .t
+
+ toplevel .t
+ frame .t.f
+ label .t.f.l -text foobar
+ grid .t.f.l
+ destroy .t
+ set result ok
+} ok
diff --git a/tests/main.test b/tests/main.test
index 1d75215..eb7ac69 100644
--- a/tests/main.test
+++ b/tests/main.test
@@ -9,7 +9,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: main.test,v 1.1.4.1 1998/09/30 02:18:47 stanton Exp $
+# RCS: @(#) $Id: main.test,v 1.1.4.2 1999/01/29 00:34:35 stanton Exp $
if {[info procs test] != "test"} {
source defs
@@ -27,5 +27,6 @@ test main-1.1 {StdinProc} {unixOnly} {
} else {
set error 0
}
+ file delete -force script
list $error $msg
} {0 {}}