diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2013-06-04 12:47:52 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2013-06-04 12:47:52 (GMT) |
commit | 4d642564803e52d1b101ccea0ac68e599e547113 (patch) | |
tree | ea85747b2b6c45fb8858f174e03e2d4e9da8c1b4 | |
parent | 4da0ba8b2d2c697d6ec47db9b951345b6a1255ff (diff) | |
download | tk-4d642564803e52d1b101ccea0ac68e599e547113.zip tk-4d642564803e52d1b101ccea0ac68e599e547113.tar.gz tk-4d642564803e52d1b101ccea0ac68e599e547113.tar.bz2 |
Suggested fix for [3613759]: ttk::entry and symbolic index names
-rw-r--r-- | generic/ttk/ttkScroll.c | 6 | ||||
-rw-r--r-- | library/xmfbox.tcl | 4 |
2 files changed, 7 insertions, 3 deletions
diff --git a/generic/ttk/ttkScroll.c b/generic/ttk/ttkScroll.c index 7ac4f14..6e8c2e3 100644 --- a/generic/ttk/ttkScroll.c +++ b/generic/ttk/ttkScroll.c @@ -37,6 +37,7 @@ #include <tk.h> #include "ttkTheme.h" #include "ttkWidget.h" +#include <string.h> /* Private data: */ @@ -202,7 +203,10 @@ int TtkScrollviewCommand( Tcl_SetObjResult(interp, Tcl_NewListObj(2, result)); return TCL_OK; } else if (objc == 3) { - if (Tcl_GetIntFromObj(interp, objv[2], &newFirst) != TCL_OK) { + 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) { return TCL_ERROR; } } else { diff --git a/library/xmfbox.tcl b/library/xmfbox.tcl index 0578361..e9ada86 100644 --- a/library/xmfbox.tcl +++ b/library/xmfbox.tcl @@ -739,7 +739,7 @@ proc ::tk::MotifFDialog_BrowseFList {w} { $data(fEnt) delete 0 end $data(fEnt) insert 0 [::tk::dialog::file::JoinFile $data(selectPath) \ $data(filter)] - $data(fEnt) xview end + $data(fEnt) xview moveto 1.0 # if it's a multiple selection box, just put in the filenames # otherwise put in the full path as usual @@ -750,7 +750,7 @@ proc ::tk::MotifFDialog_BrowseFList {w} { $data(sEnt) insert 0 [::tk::dialog::file::JoinFile $data(selectPath) \ [lindex $data(selectFile) 0]] } - $data(sEnt) xview end + $data(sEnt) xview moveto 1.0 } # ::tk::MotifFDialog_ActivateFList -- |