summaryrefslogtreecommitdiffstats
path: root/generic/tkGeometry.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2012-07-23 13:59:40 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2012-07-23 13:59:40 (GMT)
commit571fd220b0be2da05b1a6e8bb32e0b9a447ed288 (patch)
tree46a3064598e4a36c7ca561f9c08f5d22de4b2b9e /generic/tkGeometry.c
parented7fb54396eee6e5122bfe611b2a14cf422970fa (diff)
downloadtk-571fd220b0be2da05b1a6e8bb32e0b9a447ed288.zip
tk-571fd220b0be2da05b1a6e8bb32e0b9a447ed288.tar.gz
tk-571fd220b0be2da05b1a6e8bb32e0b9a447ed288.tar.bz2
Much more cleaning up of result handling.
Diffstat (limited to 'generic/tkGeometry.c')
-rw-r--r--generic/tkGeometry.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/generic/tkGeometry.c b/generic/tkGeometry.c
index 2c6c113..2e0009a 100644
--- a/generic/tkGeometry.c
+++ b/generic/tkGeometry.c
@@ -321,7 +321,8 @@ Tk_SetMinimumRequestSize(
int
TkSetGeometryMaster(
Tcl_Interp *interp, /* Current interpreter, for error. */
- Tk_Window tkwin, /* Window that will have geometry master set. */
+ Tk_Window tkwin, /* Window that will have geometry master
+ * set. */
const char *master) /* The master identity. */
{
register TkWindow *winPtr = (TkWindow *) tkwin;
@@ -332,10 +333,11 @@ TkSetGeometryMaster(
}
if (winPtr->geometryMaster != NULL) {
if (interp != NULL) {
- Tcl_AppendResult(interp, "cannot use geometry manager ", master,
- " inside ", Tk_PathName(tkwin),
- " which already has slaves managed by ",
- winPtr->geometryMaster, NULL);
+ Tcl_SetObjResult(interp, Tcl_ObjPrintf(
+ "cannot use geometry manager %s inside %s which already"
+ " has slaves managed by %s",
+ master, Tk_PathName(tkwin), winPtr->geometryMaster));
+ Tcl_SetErrorCode(interp, "TK", "GEOMETRY", "FIGHT", NULL);
}
return TCL_ERROR;
}
@@ -364,8 +366,9 @@ TkSetGeometryMaster(
void
TkFreeGeometryMaster(
- Tk_Window tkwin, /* Window that will have geometry master cleared. */
- const char *master) /* The master identity. */
+ Tk_Window tkwin, /* Window that will have geometry master
+ * cleared. */
+ const char *master) /* The master identity. */
{
register TkWindow *winPtr = (TkWindow *) tkwin;