diff options
author | hobbs <hobbs> | 2000-04-14 08:33:15 (GMT) |
---|---|---|
committer | hobbs <hobbs> | 2000-04-14 08:33:15 (GMT) |
commit | fef56976bf80f019323ba08dffe50ca4852ab2b3 (patch) | |
tree | 8e247a35f4a7ee83ba8f124dcece1315e9919ff6 /generic/tkEntry.c | |
parent | 0941394aa5a9f25b307350db2df703cff3c8d432 (diff) | |
download | tk-fef56976bf80f019323ba08dffe50ca4852ab2b3.zip tk-fef56976bf80f019323ba08dffe50ca4852ab2b3.tar.gz tk-fef56976bf80f019323ba08dffe50ca4852ab2b3.tar.bz2 |
* generic/tkCanvas.c (CanvasEventProc:2451): corrected cast
* generic/tkEntry.c (Tk_EntryObjCmd): adjusted finishing error
cases and changed TK_CONFIG_NULL_OK to TK_OPTION_NULL_OK
* tests/scale.test:
* generic/tkScale.c:
* generic/tkScale.h:
* unix/tkUnixScale.c:
* mac/tkMacScale.c: moved (PixelToValue|ValueToPixel|SetScaleValue)
to tkScale.c. Caused an associated variable to be immediately set
[Bug: 4833]
Diffstat (limited to 'generic/tkEntry.c')
-rw-r--r-- | generic/tkEntry.c | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/generic/tkEntry.c b/generic/tkEntry.c index 62c5b3e..d7c50fe 100644 --- a/generic/tkEntry.c +++ b/generic/tkEntry.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkEntry.c,v 1.12 2000/03/31 09:24:00 hobbs Exp $ + * RCS: @(#) $Id: tkEntry.c,v 1.13 2000/04/14 08:33:15 hobbs Exp $ */ #include "tkInt.h" @@ -321,23 +321,23 @@ static Tk_OptionSpec optionSpecs[] = { 0, (ClientData) stateStrings, 0}, {TK_OPTION_STRING, "-takefocus", "takeFocus", "TakeFocus", DEF_ENTRY_TAKE_FOCUS, -1, Tk_Offset(Entry, takeFocus), - TK_CONFIG_NULL_OK, 0, 0}, + TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_STRING, "-textvariable", "textVariable", "Variable", DEF_ENTRY_TEXT_VARIABLE, -1, Tk_Offset(Entry, textVarName), - TK_CONFIG_NULL_OK, 0, 0}, + TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_STRING_TABLE, "-validate", "validate", "Validate", DEF_ENTRY_VALIDATE, -1, Tk_Offset(Entry, validate), 0, (ClientData) validateStrings, 0}, {TK_OPTION_STRING, "-validatecommand", "validateCommand", "ValidateCommand", (char *) NULL, -1, Tk_Offset(Entry, validateCmd), - TK_CONFIG_NULL_OK, 0, 0}, + TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_SYNONYM, "-vcmd", (char *) NULL, (char *) NULL, (char *) NULL, 0, -1, 0, (ClientData) "-validatecommand", 0}, {TK_OPTION_INT, "-width", "width", "Width", DEF_ENTRY_WIDTH, -1, Tk_Offset(Entry, prefWidth), 0, 0, 0}, {TK_OPTION_STRING, "-xscrollcommand", "xScrollCommand", "ScrollCommand", DEF_ENTRY_SCROLL_COMMAND, -1, Tk_Offset(Entry, scrollCmd), - TK_CONFIG_NULL_OK, 0, 0}, + TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_END, (char *) NULL, (char *) NULL, (char *) NULL, (char *) NULL, 0, -1, 0, 0, 0} }; @@ -575,21 +575,15 @@ Tk_EntryObjCmd(clientData, interp, objc, objv) Tk_CreateSelHandler(entryPtr->tkwin, XA_PRIMARY, XA_STRING, EntryFetchSelection, (ClientData) entryPtr, XA_STRING); - if (Tk_InitOptions(interp, (char *) entryPtr, optionTable, tkwin) - != TCL_OK) { + if ((Tk_InitOptions(interp, (char *) entryPtr, optionTable, tkwin) + != TCL_OK) || + (ConfigureEntry(interp, entryPtr, objc-2, objv+2, 0) != TCL_OK)) { Tk_DestroyWindow(entryPtr->tkwin); return TCL_ERROR; } - if (ConfigureEntry(interp, entryPtr, objc-2, objv+2, 0) != TCL_OK) { - goto error; - } Tcl_SetResult(interp, Tk_PathName(entryPtr->tkwin), TCL_STATIC); return TCL_OK; - - error: - Tk_DestroyWindow(entryPtr->tkwin); - return TCL_ERROR; } /* |