summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhobbs <hobbs>2002-02-22 21:07:23 (GMT)
committerhobbs <hobbs>2002-02-22 21:07:23 (GMT)
commit3b946307c2548bfdbd7b1f3b0a6b3c761ac8f9a9 (patch)
tree1736c6ca9fcc94de4dd7a973168e9f8ac2fae721
parentc2216ef32520328d748937b0dcec8af60d48ad02 (diff)
downloadtk-3b946307c2548bfdbd7b1f3b0a6b3c761ac8f9a9.zip
tk-3b946307c2548bfdbd7b1f3b0a6b3c761ac8f9a9.tar.gz
tk-3b946307c2548bfdbd7b1f3b0a6b3c761ac8f9a9.tar.bz2
* generic/tkPanedWindow.c (PanedWindowWidgetObjCmd): fixed returns
that should have been breaks instead. Corrected .pw configure handling for insufficient args. [Patch #521436] (boudaillier)
-rw-r--r--generic/tkPanedWindow.c29
1 files changed, 17 insertions, 12 deletions
diff --git a/generic/tkPanedWindow.c b/generic/tkPanedWindow.c
index d3a64b5..6c38ac5 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.1 2002/02/22 02:41:17 hobbs Exp $
+ * RCS: @(#) $Id: tkPanedWindow.c,v 1.2 2002/02/22 21:07:23 hobbs Exp $
*/
#include "tkPort.h"
@@ -534,7 +534,7 @@ PanedWindowWidgetObjCmd(clientData, interp, objc, objv)
break;
}
- return ConfigureSlaves(pwPtr, interp, objc, objv);
+ result = ConfigureSlaves(pwPtr, interp, objc, objv);
break;
}
@@ -579,7 +579,8 @@ PanedWindowWidgetObjCmd(clientData, interp, objc, objv)
if (objc < 3) {
Tcl_WrongNumArgs(interp, 2, objv, "widget ?widget ...?");
- return TCL_ERROR;
+ result = TCL_ERROR;
+ break;
}
/*
@@ -616,15 +617,13 @@ PanedWindowWidgetObjCmd(clientData, interp, objc, objv)
break;
}
- if (Tcl_GetIntFromObj(interp, objv[2], &x) != TCL_OK) {
- return TCL_ERROR;
- }
-
- if (Tcl_GetIntFromObj(interp, objv[3], &y) != TCL_OK) {
- return TCL_ERROR;
+ if ((Tcl_GetIntFromObj(interp, objv[2], &x) != TCL_OK)
+ || (Tcl_GetIntFromObj(interp, objv[3], &y) != TCL_OK)) {
+ result = TCL_ERROR;
+ break;
}
- return PanedWindowIdentifyCoords(pwPtr, interp, x, y);
+ result = PanedWindowIdentifyCoords(pwPtr, interp, x, y);
break;
}
@@ -661,6 +660,12 @@ PanedWindowWidgetObjCmd(clientData, interp, objc, objv)
}
case PW_PANECONFIGURE: {
+ if (objc < 3) {
+ Tcl_WrongNumArgs(interp, 2, objv,
+ "pane ?option? ?value option value ...?");
+ result = TCL_ERROR;
+ break;
+ }
resultObj = NULL;
if (objc <= 4) {
tkwin = Tk_NameToWindow(interp, Tcl_GetString(objv[2]),
@@ -702,12 +707,12 @@ PanedWindowWidgetObjCmd(clientData, interp, objc, objv)
}
case PW_PROXY: {
- return PanedWindowProxyCommand(pwPtr, interp, objc, objv);
+ result = PanedWindowProxyCommand(pwPtr, interp, objc, objv);
break;
}
case PW_SASH: {
- return PanedWindowSashCommand(pwPtr, interp, objc, objv);
+ result = PanedWindowSashCommand(pwPtr, interp, objc, objv);
break;
}
}