summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorpspjuth <peter.spjuth@gmail.com>2002-11-07 19:10:29 (GMT)
committerpspjuth <peter.spjuth@gmail.com>2002-11-07 19:10:29 (GMT)
commitcece78a79dbca5151f873198cc5a089a0fd5cbdc (patch)
tree44db78d5717f104b3dfe4d0554d0fa4d9bfd757e /generic
parent13643396a4973234dcdcbb92f77bb3eceaf2e255 (diff)
downloadtk-cece78a79dbca5151f873198cc5a089a0fd5cbdc.zip
tk-cece78a79dbca5151f873198cc5a089a0fd5cbdc.tar.gz
tk-cece78a79dbca5151f873198cc5a089a0fd5cbdc.tar.bz2
place info did not return all settings,
and didn't make sure the result was a proper list. Put '-in' first in result to be more consistent with how grid/pack info behaves. [Bug #635025][Bug #532022]
Diffstat (limited to 'generic')
-rw-r--r--generic/tkPlace.c28
1 files changed, 10 insertions, 18 deletions
diff --git a/generic/tkPlace.c b/generic/tkPlace.c
index 9d5e7f5..05a75fb 100644
--- a/generic/tkPlace.c
+++ b/generic/tkPlace.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkPlace.c,v 1.12 2002/06/14 22:25:12 jenglish Exp $
+ * RCS: @(#) $Id: tkPlace.c,v 1.13 2002/11/07 19:10:30 pspjuth Exp $
*/
#include "tkPort.h"
@@ -735,7 +735,11 @@ PlaceInfoCommand(interp, tkwin)
if (slavePtr == NULL) {
return TCL_OK;
}
- sprintf(buffer, "-x %d", slavePtr->x);
+ if (slavePtr->masterPtr != NULL) {
+ Tcl_AppendElement(interp, "-in");
+ Tcl_AppendElement(interp, Tk_PathName(slavePtr->masterPtr->tkwin));
+ }
+ sprintf(buffer, " -x %d", slavePtr->x);
Tcl_AppendResult(interp, buffer, (char *) NULL);
sprintf(buffer, " -relx %.4g", slavePtr->relX);
Tcl_AppendResult(interp, buffer, (char *) NULL);
@@ -768,22 +772,10 @@ PlaceInfoCommand(interp, tkwin)
Tcl_AppendResult(interp, " -relheight {}", (char *) NULL);
}
- Tcl_AppendResult(interp, " -anchor ",
- Tk_NameOfAnchor(slavePtr->anchor),
- (char *) NULL);
- if (slavePtr->borderMode == BM_OUTSIDE) {
- Tcl_AppendResult(interp, " -bordermode outside",
- (char *) NULL);
- } else if (slavePtr->borderMode == BM_IGNORE) {
- Tcl_AppendResult(interp, " -bordermode ignore", (char *) NULL);
- }
- if ((slavePtr->masterPtr != NULL)
- && (slavePtr->masterPtr->tkwin !=
- Tk_Parent(slavePtr->tkwin))) {
- Tcl_AppendResult(interp, " -in ",
- Tk_PathName(slavePtr->masterPtr->tkwin),
- (char *) NULL);
- }
+ Tcl_AppendElement(interp, "-anchor");
+ Tcl_AppendElement(interp, Tk_NameOfAnchor(slavePtr->anchor));
+ Tcl_AppendElement(interp, "-bordermode");
+ Tcl_AppendElement(interp, borderModeStrings[slavePtr->borderMode]);
return TCL_OK;
}