diff options
author | mdejong <mdejong> | 2003-03-12 00:09:32 (GMT) |
---|---|---|
committer | mdejong <mdejong> | 2003-03-12 00:09:32 (GMT) |
commit | 6be1cd95fff709a3869038db3e989865154259fb (patch) | |
tree | ecef370c50b2d02b66d81ba8deaa5e9601199442 /tests/grid.test | |
parent | 7be603f3c85d34e87e54b45c813ecbe337c89854 (diff) | |
download | tk-6be1cd95fff709a3869038db3e989865154259fb.zip tk-6be1cd95fff709a3869038db3e989865154259fb.tar.gz tk-6be1cd95fff709a3869038db3e989865154259fb.tar.bz2 |
* generic/tkGrid.c (GridStructureProc, ConfigureSlaves):
Check for a NULL masterPtr and slavePtr in the
GridStructureProc code to ensure that a Gridder
created before some error condition is ignored
when it comes to geometry calculations. This
approach closely matches the pack implementation.
Keep track of a -in argument to a grid command
in order to detect the case of an already
gridded widget that wants to change some options.
The previous implementation could make repeated
and unnecessary calls to Tk_ManageGeometry.
Replace use of "parent" with "master" in comments
throughout the file.
* generic/tkPack.c (PackStructureProc): Check for
a NULL masterPtr before other checks so that a
slave created under certain error conditions
is cleaned up properly.
Replace use of "parent" with "master" in comments
throughout the file.
* generic/tkPlace.c (CreateSlave, ConfigureSlave,
SlaveStructureProc):
Don't call Tk_ManageGeometry in CreateSlave since
this was causing incorrect results in some error
cases. Rework the ConfigureSlave method so that
slave setup is done in one place. The call to
Tk_ManageGeometry was added to the one place
where a slave is setup. When a slave is configured
but the master is not changed, simply goto the
scheduleLayout label. Check for a NULL master
in SlaveStructureProc for the sake of readability.
* tests/grid.test:
* tests/pack.test:
* tests/place.test: Add test to check that a
winfo manager call does not return incorrect
results after an error condition is hit.
[Patch 693063]
Diffstat (limited to 'tests/grid.test')
-rw-r--r-- | tests/grid.test | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/grid.test b/tests/grid.test index c47348e..47f99c0 100644 --- a/tests/grid.test +++ b/tests/grid.test @@ -5,7 +5,7 @@ # Copyright (c) 1998-1999 by Scriptics Corporation. # All rights reserved. # -# RCS: @(#) $Id: grid.test,v 1.17 2002/10/10 21:07:52 pspjuth Exp $ +# RCS: @(#) $Id: grid.test,v 1.18 2003/03/12 00:09:37 mdejong Exp $ package require tcltest 2.1 namespace import -force tcltest::configure @@ -946,6 +946,14 @@ test grid-13.1 {-in} { } {1 {Window can't be managed in itself}} grid_reset 13.1 +test grid-13.1.1 {-in} { + frame .f -bg red + list [winfo manager .f] \ + [catch {grid .f -in .f} err] $err \ + [winfo manager .f] +} {{} 1 {Window can't be managed in itself} {}} +grid_reset 13.1.1 + test grid-13.2 {-in} { frame .f -bg red list [catch "grid .f -in .bad" msg] $msg |