summaryrefslogtreecommitdiffstats
path: root/generic/ttk
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2013-06-05 13:03:22 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2013-06-05 13:03:22 (GMT)
commitca692c25e794ecf3331faf24768f69a838b32900 (patch)
tree92859838396d648063a8b2de87532b940528d730 /generic/ttk
parent2feaf00ad478173ca2542802f4821bda8b5b57cd (diff)
parentb38ed5b362e85be991db22a2d7059b14b3772db4 (diff)
downloadtk-ca692c25e794ecf3331faf24768f69a838b32900.zip
tk-ca692c25e794ecf3331faf24768f69a838b32900.tar.gz
tk-ca692c25e794ecf3331faf24768f69a838b32900.tar.bz2
Fix [2100430]: ttk::entry widget index must be integer
Diffstat (limited to 'generic/ttk')
-rw-r--r--generic/ttk/ttkEntry.c8
-rw-r--r--generic/ttk/ttkScroll.c5
2 files changed, 9 insertions, 4 deletions
diff --git a/generic/ttk/ttkEntry.c b/generic/ttk/ttkEntry.c
index 62a2720..f395649 100644
--- a/generic/ttk/ttkEntry.c
+++ b/generic/ttk/ttkEntry.c
@@ -1644,6 +1644,14 @@ 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;
+ }
return TtkScrollviewCommand(interp, objc, objv, entryPtr->entry.xscrollHandle);
}
diff --git a/generic/ttk/ttkScroll.c b/generic/ttk/ttkScroll.c
index 2ff3d8e..2bd3ddb 100644
--- a/generic/ttk/ttkScroll.c
+++ b/generic/ttk/ttkScroll.c
@@ -202,10 +202,7 @@ int TtkScrollviewCommand(
Tcl_SetObjResult(interp, Tcl_NewListObj(2, result));
return TCL_OK;
} else if (objc == 3) {
- const char *string = Tcl_GetString(objv[2]);
- if (strcmp(string, "end") == 0) {
- newFirst = s->total;
- } else if (Tcl_GetIntFromObj(interp, objv[2], &newFirst) != TCL_OK) {
+ if (Tcl_GetIntFromObj(interp, objv[2], &newFirst) != TCL_OK) {
return TCL_ERROR;
}
} else {