Tk Source Code

Check-in [054999f4]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Bug 2358545: Restore support for values "08" and "09"in a spinbox configured to use -from and -to values.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 054999f452c30d6b796509c33e0eac3e588148a8
User & Date: dgp 2011-06-07 21:14:22
Context
2011-06-07
21:28
merge mark check-in: 3c9aabd2 user: dgp tags: trunk
21:14
Bug 2358545: Restore support for values "08" and "09"in a spinbox configured to use -from and -to values. check-in: 054999f4 user: dgp tags: trunk
21:06
Bug 2358545: Restore support for values "08" and "09"in a [spinbox] configured to use -from and -to values. check-in: 621ce463 user: dgp tags: core-8-5-branch
2011-06-06
22:06
Restore proper NUL output to the [console]. [Bug 2546087] check-in: 6c8cc1da user: dgp tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to ChangeLog.






1
2
3
4
5
6
7





2011-06-06  Don Porter  <[email protected]>

	* generic/tkConsole.c:	Restore proper NUL output to the [console].
	* library/console.tcl: [Bug 2546087]

2011-04-22  Peter Spjuth  <[email protected]>

>
>
>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
2011-06-07  Don Porter  <[email protected]>

	* generic/tkEntry.c:	Restore support for values "08" and "09"
	in a [spinbox] configured to use -from and -to values.  [Bug 2358545].

2011-06-06  Don Porter  <[email protected]>

	* generic/tkConsole.c:	Restore proper NUL output to the [console].
	* library/console.tcl: [Bug 2546087]

2011-04-22  Peter Spjuth  <[email protected]>

Changes to generic/tkEntry.c.

1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
	    /*
	     * If the valueStr is empty and -from && -to are specified, check
	     * to see if the current string is within the range. If not, it
	     * will be constrained to the nearest edge. If the current string
	     * isn't a double value, we set it to -from.
	     */

	    int code;
	    double dvalue;

	    code = Tcl_GetDouble(NULL, entryPtr->string, &dvalue);
	    if (code != TCL_OK) {
		dvalue = sbPtr->fromValue;
	    } else if (dvalue > sbPtr->toValue) {
		dvalue = sbPtr->toValue;
	    } else if (dvalue < sbPtr->fromValue) {
		dvalue = sbPtr->fromValue;
	    }
	    sprintf(sbPtr->formatBuf, sbPtr->valueFormat, dvalue);







<


|
|







1323
1324
1325
1326
1327
1328
1329

1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
	    /*
	     * If the valueStr is empty and -from && -to are specified, check
	     * to see if the current string is within the range. If not, it
	     * will be constrained to the nearest edge. If the current string
	     * isn't a double value, we set it to -from.
	     */


	    double dvalue;

	    if (sscanf(entryPtr->string, "%lf", &dvalue) == 0) {
		/* Scan failure */
		dvalue = sbPtr->fromValue;
	    } else if (dvalue > sbPtr->toValue) {
		dvalue = sbPtr->toValue;
	    } else if (dvalue < sbPtr->fromValue) {
		dvalue = sbPtr->fromValue;
	    }
	    sprintf(sbPtr->formatBuf, sbPtr->valueFormat, dvalue);
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
		}
	    }
	    Tcl_ListObjIndex(interp, sbPtr->listObj, sbPtr->eIndex, &objPtr);
	    EntryValueChanged(entryPtr, Tcl_GetString(objPtr));
	} else if (!DOUBLES_EQ(sbPtr->fromValue, sbPtr->toValue)) {
	    double dvalue;

	    if (Tcl_GetDouble(NULL, entryPtr->string, &dvalue) != TCL_OK) {
		/*
		 * If the string is empty, or isn't a valid double value, just
		 * use the -from value
		 */

		dvalue = sbPtr->fromValue;
	    } else if (up) {
		dvalue += sbPtr->increment;
		if (dvalue > sbPtr->toValue) {







|

|







4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
		}
	    }
	    Tcl_ListObjIndex(interp, sbPtr->listObj, sbPtr->eIndex, &objPtr);
	    EntryValueChanged(entryPtr, Tcl_GetString(objPtr));
	} else if (!DOUBLES_EQ(sbPtr->fromValue, sbPtr->toValue)) {
	    double dvalue;

	    if (sscanf(entryPtr->string, "%lf", &dvalue) == 0) {
		/*
		 * If the string doesn't scan as a double value, just
		 * use the -from value
		 */

		dvalue = sbPtr->fromValue;
	    } else if (up) {
		dvalue += sbPtr->increment;
		if (dvalue > sbPtr->toValue) {