Tk Source Code

Check-in [6ac14e0c]
Login
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to [email protected]
or submit via the online form by Sep 9.

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

Overview
Comment:Revert irrelevant blank changes
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | bug-2513186fff | bug-8261c517af
Files: files | file ages | folders
SHA3-256: 6ac14e0c6b93471a8daeb42adc9eb828f27330da90d956770d3c91df3abe56be
User & Date: fvogel 2019-04-27 15:55:08
Context
2019-04-28
10:45
Add a missing scroll info update needed to make x|yview moveto|units|pages work without an update idletasks call beforehand. check-in: 231587eb user: fvogel tags: bug-2513186fff, bug-8261c517af
2019-04-27
15:55
Revert irrelevant blank changes check-in: 6ac14e0c user: fvogel tags: bug-2513186fff, bug-8261c517af
15:49
More generic fix, for [8261c517af] and [2513186fff]. check-in: bc932da8 user: fvogel tags: bug-2513186fff, bug-8261c517af
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to generic/ttk/ttkEntry.c.

1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
/* $entry xview	-- horizontal scrolling interface
 */
static int EntryXViewCommand(
    void *recordPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[])
{
    Entry *entryPtr = recordPtr;

    if (objc == 3) {
	int newFirst;
	if (EntryIndex(interp, entryPtr, objv[2], &newFirst) != TCL_OK) {
	    return TCL_ERROR;
	}
	TtkScrollTo(entryPtr->entry.xscrollHandle, newFirst);
	return TCL_OK;






<







1647
1648
1649
1650
1651
1652
1653

1654
1655
1656
1657
1658
1659
1660
/* $entry xview	-- horizontal scrolling interface
 */
static int EntryXViewCommand(
    void *recordPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[])
{
    Entry *entryPtr = recordPtr;

    if (objc == 3) {
	int newFirst;
	if (EntryIndex(interp, entryPtr, objv[2], &newFirst) != TCL_OK) {
	    return TCL_ERROR;
	}
	TtkScrollTo(entryPtr->entry.xscrollHandle, newFirst);
	return TCL_OK;

Changes to generic/ttk/ttkScroll.c.

202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
         * Update the scroll info (first, last, total) if needed.
         */

        if (h->corePtr->flags & REDISPLAY_PENDING) {
            h->corePtr->widgetSpec->layoutProc(h->corePtr);
        }

        result[0] = Tcl_NewDoubleObj((double)s->first / s->total);
	result[1] = Tcl_NewDoubleObj((double)s->last / s->total);
	Tcl_SetObjResult(interp, Tcl_NewListObj(2, result));
	return TCL_OK;
    } else if (objc == 3) {
	if (Tcl_GetIntFromObj(interp, objv[2], &newFirst) != TCL_OK) {
	    return TCL_ERROR;
	}






|







202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
         * Update the scroll info (first, last, total) if needed.
         */

        if (h->corePtr->flags & REDISPLAY_PENDING) {
            h->corePtr->widgetSpec->layoutProc(h->corePtr);
        }

	result[0] = Tcl_NewDoubleObj((double)s->first / s->total);
	result[1] = Tcl_NewDoubleObj((double)s->last / s->total);
	Tcl_SetObjResult(interp, Tcl_NewListObj(2, result));
	return TCL_OK;
    } else if (objc == 3) {
	if (Tcl_GetIntFromObj(interp, objv[2], &newFirst) != TCL_OK) {
	    return TCL_ERROR;
	}