| 1 |
Description: Patch replaces call to TkCopyAndGlobalEval by a call to |
| 2 |
Tcl_EvalObjEx because the former function has been dropped in Tk 8.6. |
| 3 |
Last-Modified: Fri, 04 Jul 2014 09:18:32 +0400 |
| 4 |
|
| 5 |
--- a/generic/tkButton.c |
| 6 |
+++ b/generic/tkButton.c |
| 7 |
@@ -864,8 +864,6 @@ |
| 8 |
static Blt_TileChangedProc TileChangedProc; |
| 9 |
static Tcl_CmdProc ButtonCmd, LabelCmd, CheckbuttonCmd, RadiobuttonCmd; |
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
#if (TK_MAJOR_VERSION > 4) |
| 14 |
EXTERN void TkComputeAnchor _ANSI_ARGS_((Tk_Anchor anchor, Tk_Window tkwin, |
| 15 |
int padX, int padY, int innerWidth, int innerHeight, int *xPtr, |
| 16 |
@@ -3292,7 +3290,12 @@ |
| 17 |
} |
| 18 |
} |
| 19 |
if ((butPtr->type > TYPE_LABEL) && (butPtr->command != NULL)) { |
| 20 |
|
| 21 |
+ Tcl_DString buf; |
| 22 |
+ Tcl_DStringInit(&buf); |
| 23 |
+ Tcl_DStringAppend(&buf, butPtr->command, -1); |
| 24 |
+ int code = Tcl_EvalEx(butPtr->interp, Tcl_DStringValue(&buf), Tcl_DStringLength(&buf), TCL_EVAL_GLOBAL); |
| 25 |
+ Tcl_DStringFree(&buf); |
| 26 |
+ return code; |
| 27 |
} |
| 28 |
return TCL_OK; |
| 29 |
} |