summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhobbs <hobbs>2002-09-30 18:55:56 (GMT)
committerhobbs <hobbs>2002-09-30 18:55:56 (GMT)
commit1b44ccbe9877edeec3d8ff1513bff67bea09fa6e (patch)
treec2a0a6a14219ebcd64bd64480e7cb91f1d0d6586
parentb4824bcca26ab41c141dc900cf409f7ef8084ae5 (diff)
downloadtk-1b44ccbe9877edeec3d8ff1513bff67bea09fa6e.zip
tk-1b44ccbe9877edeec3d8ff1513bff67bea09fa6e.tar.gz
tk-1b44ccbe9877edeec3d8ff1513bff67bea09fa6e.tar.bz2
* tests/panedwindow.test: added panedwindow-28.[12]
* generic/tkPanedWindow.c (PanedWindowCmdDeletedProc): (Tk_PanedWindowObjCmd): when destroying the panedwindow, destroy the proxy before the parent to avoid dependency conflicts. [Bug #616589]
-rw-r--r--ChangeLog8
-rw-r--r--generic/tkPanedWindow.c6
-rw-r--r--tests/panedwindow.test19
3 files changed, 25 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index b18d662..792131b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2002-09-30 Jeff Hobbs <jeffh@ActiveState.com>
+
+ * tests/panedwindow.test: added panedwindow-28.[12]
+ * generic/tkPanedWindow.c (PanedWindowCmdDeletedProc):
+ (Tk_PanedWindowObjCmd): when destroying the panedwindow, destroy
+ the proxy before the parent to avoid dependency conflicts.
+ [Bug #616589]
+
2002-09-30 Donal K. Fellows <fellowsd@cs.man.ac.uk>
* tests/unixSelect.test: Test for various things that can fail to
diff --git a/generic/tkPanedWindow.c b/generic/tkPanedWindow.c
index 1f5f83c..c419847 100644
--- a/generic/tkPanedWindow.c
+++ b/generic/tkPanedWindow.c
@@ -12,7 +12,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkPanedWindow.c,v 1.8 2002/08/08 01:43:31 hobbs Exp $
+ * RCS: @(#) $Id: tkPanedWindow.c,v 1.9 2002/09/30 18:55:57 hobbs Exp $
*/
#include "tkPort.h"
@@ -418,8 +418,8 @@ Tk_PanedWindowObjCmd(clientData, interp, objc, objv)
(ClientData) pwPtr);
if (ConfigurePanedWindow(interp, pwPtr, objc - 2, objv + 2) != TCL_OK) {
- Tk_DestroyWindow(pwPtr->tkwin);
Tk_DestroyWindow(pwPtr->proxywin);
+ Tk_DestroyWindow(pwPtr->tkwin);
ckfree((char *) pwPtr);
return TCL_ERROR;
}
@@ -1309,8 +1309,8 @@ PanedWindowCmdDeletedProc(clientData)
*/
if (!(pwPtr->flags & WIDGET_DELETED)) {
- Tk_DestroyWindow(pwPtr->tkwin);
Tk_DestroyWindow(pwPtr->proxywin);
+ Tk_DestroyWindow(pwPtr->tkwin);
}
}
diff --git a/tests/panedwindow.test b/tests/panedwindow.test
index 6185b67..d1db959 100644
--- a/tests/panedwindow.test
+++ b/tests/panedwindow.test
@@ -6,7 +6,7 @@
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
#
-# RCS: @(#) $Id: panedwindow.test,v 1.4 2002/08/08 01:43:44 hobbs Exp $
+# RCS: @(#) $Id: panedwindow.test,v 1.5 2002/09/30 18:55:57 hobbs Exp $
package require tcltest 2.1
namespace import -force tcltest::configure
@@ -44,7 +44,7 @@ foreach test {
} [list [lindex $test 2] [lindex $test 2]]
incr i
if {[lindex $test 3] != ""} {
- test entry-1.$i {configuration options} {
+ test panedwindow-1.$i {configuration options} {
list [catch {.p configure $name [lindex $test 3]} msg] $msg
} [list 1 [lindex $test 4]]
}
@@ -70,7 +70,7 @@ foreach test {
} [list [lindex $test 2] [lindex $test 2]]
incr i
if {[lindex $test 3] != ""} {
- test entry-1.$i {configuration options} {
+ test panedwindow-1.$i {configuration options} {
list [catch {.p paneconfigure .b $name [lindex $test 3]} msg] $msg
} [list 1 [lindex $test 4]]
}
@@ -2385,8 +2385,17 @@ test panedwindow-27.26 {PanedWindowIdentifyCoords} {
destroy .p .f .f2 .f3
set result
} {1 sash}
-
-
+
+test panedwindow-28.1 {destroy the window cleanly on error [Bug #616589]} {
+ list [catch {panedwindow .p -bogusopt bogus} msg] $msg
+} {1 {unknown option "-bogusopt"}}
+test panedwindow-28.2 {destroy the window cleanly on rename [Bug #616589]} {
+ destroy .p
+ panedwindow .p
+ rename .p {}
+ winfo exists .p
+} {0}
+
# cleanup
::tcltest::cleanupTests
return