From 282f0f285bae5c21efe87f27db67df25709567fd Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Wed, 23 Jan 2013 16:17:51 +0000 Subject: Eliminate use of deprecated Tcl_VarEval function from ttk. --- generic/ttk/ttkScroll.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/generic/ttk/ttkScroll.c b/generic/ttk/ttkScroll.c index defe05a..b670540 100644 --- a/generic/ttk/ttkScroll.c +++ b/generic/ttk/ttkScroll.c @@ -78,6 +78,7 @@ static int UpdateScrollbar(Tcl_Interp *interp, ScrollHandle h) char arg1[TCL_DOUBLE_SPACE + 2]; char arg2[TCL_DOUBLE_SPACE + 2]; int code; + Tcl_DString buf; h->flags &= ~SCROLL_UPDATE_REQUIRED; @@ -88,9 +89,14 @@ static int UpdateScrollbar(Tcl_Interp *interp, ScrollHandle h) arg1[0] = arg2[0] = ' '; Tcl_PrintDouble(interp, (double)s->first / s->total, arg1+1); Tcl_PrintDouble(interp, (double)s->last / s->total, arg2+1); + Tcl_DStringInit(&buf); + Tcl_DStringAppend(&buf, s->scrollCmd, -1); + Tcl_DStringAppend(&buf, arg1, -1); + Tcl_DStringAppend(&buf, arg2, -1); Tcl_Preserve(corePtr); - code = Tcl_VarEval(interp, s->scrollCmd, arg1, arg2, NULL); + code = Tcl_EvalEx(interp, Tcl_DStringValue(&buf), -1, TCL_EVAL_GLOBAL); + Tcl_DStringFree(&buf); if (WidgetDestroyed(corePtr)) { Tcl_Release(corePtr); return TCL_ERROR; -- cgit v0.12 From bbbc32416a291c8abda4072bafa9579418034907 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Thu, 24 Jan 2013 13:30:44 +0000 Subject: remove duplicate code --- win/tkWinWm.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/win/tkWinWm.c b/win/tkWinWm.c index f6723e0..9ea4957 100644 --- a/win/tkWinWm.c +++ b/win/tkWinWm.c @@ -5309,11 +5309,6 @@ WmStateCmd( return TCL_ERROR; } - if (Tcl_GetIndexFromObj(interp, objv[3], optionStrings, "argument", 0, - &index) != TCL_OK) { - return TCL_ERROR; - } - if (winPtr->flags & TK_EMBEDDED) { int state = 0; -- cgit v0.12