Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Changes In Branch tip-698 Excluding Merge-Ins
This is equivalent to a diff from 2a1dd0c2 to 5abcbde1
2024-12-22
| ||
00:06 | Merge 9.0 Leaf check-in: 5abcbde1 user: jan.nijtmans tags: tip-698 | |
2024-12-21
| ||
18:06 | version -> 9.0.2 Leaf check-in: 2a1dd0c2 user: jan.nijtmans tags: trunk, main | |
16:51 | Fix [f88118a47]: inaccurate scrollbar error-message check-in: b750c756 user: jan.nijtmans tags: trunk, main | |
2024-12-19
| ||
15:40 | Correct error-messages, remove unused variables check-in: 59232f0a user: jan.nijtmans tags: tip-698 | |
Changes to generic/tk.h.
︙ | |||
228 229 230 231 232 233 234 235 236 237 238 239 240 241 | 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 | + | #define TK_OPTION_DONT_SET_DEFAULT (1 << 3) #if TCL_MAJOR_VERSION > 8 # define TK_OPTION_NULL_OK TCL_NULL_OK #else # define TK_OPTION_NULL_OK (1 << 0) #endif #define TK_OPTION_NEG_OK (1 << 6) /* For TK_OPTION_PIXELS only, so no conflict with TK_OPTION_VAR */ #define TK_OPTION_VAR(type) ((sizeof(type) < 2 * sizeof(int)) ? ((int)(sizeof(type)&(sizeof(int)-1))<<6) : (3<<6)) #define TK_OPTION_ENUM_VAR TK_OPTION_VAR(Tk_OptionType) /* * The following structure and function types are used by TK_OPTION_CUSTOM * options; the structure holds pointers to the functions needed by the Tk * option config code to handle a custom option. |
︙ |
Changes to generic/tkButton.c.
︙ | |||
1089 1090 1091 1092 1093 1094 1095 | 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | if ((butPtr->state == STATE_ACTIVE) && !Tk_StrictMotif(butPtr->tkwin)) { Tk_SetBackgroundFromBorder(butPtr->tkwin, butPtr->activeBorder); } else { Tk_SetBackgroundFromBorder(butPtr->tkwin, butPtr->normalBorder); } Tk_GetPixelsFromObj(NULL, butPtr->tkwin, butPtr->wrapLengthObj, &wrapLength); |
︙ |
Changes to generic/tkCanvas.c.
︙ | |||
2289 2290 2291 2292 2293 2294 2295 | 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | Tk_GetPixelsFromObj(NULL, canvasPtr->tkwin, canvasPtr->highlightWidthObj, &highlightWidth); Tk_GetPixelsFromObj(NULL, canvasPtr->tkwin, (Tcl_Obj *)canvasPtr->textInfo.reserved1, &canvasPtr->textInfo.insertBorderWidth); Tk_GetPixelsFromObj(NULL, canvasPtr->tkwin, (Tcl_Obj *)canvasPtr->textInfo.reserved2, &canvasPtr->textInfo.insertWidth); Tk_GetPixelsFromObj(NULL, canvasPtr->tkwin, (Tcl_Obj *)canvasPtr->textInfo.reserved3, &canvasPtr->textInfo.selBorderWidth); Tk_GetPixelsFromObj(NULL, canvasPtr->tkwin, canvasPtr->widthObj, &width); Tk_GetPixelsFromObj(NULL, canvasPtr->tkwin, canvasPtr->xScrollIncrementObj, &xScrollIncrement); Tk_GetPixelsFromObj(NULL, canvasPtr->tkwin, canvasPtr->yScrollIncrementObj, &yScrollIncrement); |
︙ |
Changes to generic/tkConfig.c.
︙ | |||
1017 1018 1019 1020 1021 1022 1023 | 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 | + - - + + + + + | if (nullOK && ObjectIsEmpty(valuePtr)) { valuePtr = NULL; newPixels = INT_MIN; } else if (Tk_GetPixelsFromObj(nullOK ? NULL : interp, tkwin, valuePtr, &newPixels) != TCL_OK) { if (nullOK) { wrongPixel: |
︙ |
Changes to generic/tkEntry.c.
︙ | |||
1186 1187 1188 1189 1190 1191 1192 | 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | border = entryPtr->readonlyBorder; } else { border = entryPtr->normalBorder; } Tk_SetBackgroundFromBorder(entryPtr->tkwin, border); Tk_GetPixelsFromObj(NULL, entryPtr->tkwin, entryPtr->borderWidthObj, &borderWidth); |
︙ |
Changes to generic/tkFrame.c.
︙ | |||
983 984 985 986 987 988 989 | 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | if (framePtr->border != NULL) { Tk_SetBackgroundFromBorder(framePtr->tkwin, framePtr->border); } else { Tk_SetWindowBackgroundPixmap(framePtr->tkwin, None); } Tk_GetPixelsFromObj(NULL, framePtr->tkwin, framePtr->widthObj, &width); |
︙ |
Changes to generic/tkListbox.c.
︙ | |||
1558 1559 1560 1561 1562 1563 1564 | 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 | - + | Tcl_Size objc, /* Number of valid entries in argv. */ Tcl_Obj *const objv[]) /* Arguments. */ { Tk_SavedOptions savedOptions; Tcl_Obj *oldListObj = NULL; Tcl_Obj *errorResult = NULL; int oldExport, error; |
︙ | |||
1596 1597 1598 1599 1600 1601 1602 | 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 | - - - - - - - - - - - - - - - - - - - | * A few options need special processing, such as setting the * background from a 3-D border. */ Tk_SetBackgroundFromBorder(listPtr->tkwin, listPtr->normalBorder); Tk_GetPixelsFromObj(NULL, listPtr->tkwin, listPtr->borderWidthObj, &borderWidth); |
︙ |
Changes to generic/tkMenubutton.c.
︙ | |||
479 480 481 482 483 484 485 | 479 480 481 482 483 484 485 486 487 488 489 490 491 492 | - - | int objc, /* Number of valid entries in objv. */ Tcl_Obj *const objv[]) /* Arguments. */ { Tk_SavedOptions savedOptions; Tcl_Obj *errorResult = NULL; int error; Tk_Image image; |
︙ | |||
533 534 535 536 537 538 539 | 531 532 533 534 535 536 537 538 539 540 541 542 543 544 | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | if ((mbPtr->state == STATE_ACTIVE) && !Tk_StrictMotif(mbPtr->tkwin)) { Tk_SetBackgroundFromBorder(mbPtr->tkwin, mbPtr->activeBorder); } else { Tk_SetBackgroundFromBorder(mbPtr->tkwin, mbPtr->normalBorder); } |
︙ |
Changes to generic/tkMessage.c.
︙ | |||
435 436 437 438 439 440 441 | 435 436 437 438 439 440 441 442 443 444 445 446 447 448 | - | Message *msgPtr, /* Information about widget; may or may not * already have values for some fields. */ int objc, /* Number of valid entries in argv. */ Tcl_Obj *const objv[], /* Arguments. */ TCL_UNUSED(int)) /* Flags to pass to Tk_ConfigureWidget. */ { Tk_SavedOptions savedOptions; |
︙ | |||
476 477 478 479 480 481 482 | 475 476 477 478 479 480 481 482 483 484 485 486 487 488 | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | } msgPtr->stringObj = Tcl_NewStringObj(value, TCL_INDEX_NONE); Tcl_IncrRefCount(msgPtr->stringObj); } Tcl_TraceVar2(interp, Tcl_GetString(msgPtr->textVarNameObj), NULL, TCL_GLOBAL_ONLY|TCL_TRACE_WRITES|TCL_TRACE_UNSETS, MessageTextVarProc, msgPtr); |
︙ |
Changes to generic/tkOldConfig.c.
︙ | |||
515 516 517 518 519 520 521 | 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 | - + - - + - - + + + + + + + + - + - + - | } break; case TK_CONFIG_JOIN_STYLE: if (Tk_GetJoinStyle(interp, value, (int *)ptr) != TCL_OK) { return TCL_ERROR; } break; |
︙ |
Changes to generic/tkPanedWindow.c.
︙ | |||
917 918 919 920 921 922 923 | 917 918 919 920 921 922 923 924 925 926 927 928 929 930 | - - - - - | for (j = 0; j < pwPtr->numPanes; j++) { if (pwPtr->panes[j] != NULL && pwPtr->panes[j]->tkwin == tkwin) { int minSize; Tk_SetOptions(interp, pwPtr->panes[j], pwPtr->paneOpts, objc - firstOptionArg, objv + firstOptionArg, pwPtr->tkwin, NULL, NULL); Tk_GetPixelsFromObj(NULL, tkwin, pwPtr->panes[j]->minSizeObj, &minSize); |
︙ | |||
983 984 985 986 987 988 989 | 978 979 980 981 982 983 984 985 986 987 988 989 990 991 | - - - - - | } if (panePtr->height > 0) { panePtr->paneHeight = panePtr->height; } else { panePtr->paneHeight = Tk_ReqHeight(tkwin) + doubleBw; } Tk_GetPixelsFromObj(NULL, panePtr->tkwin, panePtr->minSizeObj, &minSize); |
︙ |
Changes to generic/tkPlace.c.
︙ | |||
80 81 82 83 84 85 86 | 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 | - + - + - + - + | static const Tk_OptionSpec optionSpecs[] = { {TK_OPTION_ANCHOR, "-anchor", NULL, NULL, "nw", TCL_INDEX_NONE, offsetof(Content, anchor), TK_OPTION_ENUM_VAR, 0, 0}, {TK_OPTION_STRING_TABLE, "-bordermode", NULL, NULL, "inside", TCL_INDEX_NONE, offsetof(Content, borderMode), TK_OPTION_ENUM_VAR, borderModeStrings, 0}, {TK_OPTION_PIXELS, "-height", NULL, NULL, NULL, offsetof(Content, heightObj), |
︙ |
Changes to generic/tkScale.c.
︙ | |||
671 672 673 674 675 676 677 | 671 672 673 674 675 676 677 678 679 680 681 682 683 684 | - - - - - - - - | ComputeFormat(scalePtr, 0); ComputeFormat(scalePtr, 1); Tk_SetBackgroundFromBorder(scalePtr->tkwin, scalePtr->bgBorder); Tk_GetPixelsFromObj(NULL, scalePtr->tkwin, scalePtr->highlightWidthObj, &highlightWidth); |
︙ |
Changes to generic/tkScrollbar.c.
︙ | |||
467 468 469 470 471 472 473 | 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | TkScrollbar *scrollPtr, /* Information about widget; may or may not * already have values for some fields. */ Tcl_Size objc, /* Number of valid entries in argv. */ Tcl_Obj *const objv[], /* Arguments. */ int flags) /* Flags to pass to Tk_ConfigureWidget. */ { |
︙ |
Changes to generic/tkText.c.
︙ | |||
2201 2202 2203 2204 2205 2206 2207 | 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | } /* * Don't allow negative spacings. */ Tk_GetPixelsFromObj(NULL, textPtr->tkwin, textPtr->spacing1Obj, &spacing1); |
︙ |
Changes to generic/tkTextDisp.c.
︙ | |||
5246 5247 5248 5249 5250 5251 5252 | 5246 5247 5248 5249 5250 5251 5252 5253 5254 5255 5256 5257 5258 5259 | - - - - - - | * it. */ Tk_GetPixelsFromObj(NULL, textPtr->tkwin, textPtr->padXObj, &padX); Tk_GetPixelsFromObj(NULL, textPtr->tkwin, textPtr->padYObj, &padY); Tk_GetPixelsFromObj(NULL, textPtr->tkwin, textPtr->borderWidthObj, &borderWidth); Tk_GetPixelsFromObj(NULL, textPtr->tkwin, textPtr->highlightWidthObj, &highlightWidth); |
︙ |
Changes to generic/tkTextTag.c.
︙ | |||
38 39 40 41 42 43 44 | 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 | - + | {TK_OPTION_PIXELS, "-lmargin1", NULL, NULL, NULL, offsetof(TkTextTag, lMargin1Obj), TCL_INDEX_NONE, TK_OPTION_NULL_OK,0,0}, {TK_OPTION_PIXELS, "-lmargin2", NULL, NULL, NULL, offsetof(TkTextTag, lMargin2Obj), TCL_INDEX_NONE, TK_OPTION_NULL_OK,0,0}, {TK_OPTION_BORDER, "-lmargincolor", NULL, NULL, NULL, TCL_INDEX_NONE, offsetof(TkTextTag, lMarginColor), TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_PIXELS, "-offset", NULL, NULL, |
︙ | |||
359 360 361 362 363 364 365 | 359 360 361 362 363 364 365 366 367 368 369 370 371 372 | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | /* * Some of the configuration options, like -underline and * -justify, require additional translation (this is needed * because we need to distinguish a particular value of an option * from "unspecified"). */ |
︙ |
Changes to tests/button.test.
︙ | |||
2665 2666 2667 2668 2669 2670 2671 | 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 | - + - + | checkbutton .c .c configure -selectcolor {} } -cleanup { destroy .c } -result {} test button-1.271 {configuration options: fallback to default} -setup { |
︙ |
Changes to tests/entry.test.
︙ | |||
316 317 318 319 320 321 322 | 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 | - + | pack .e ; update idletasks update } -body { .e configure -highlightthickness -2 .e cget -highlightthickness } -cleanup { destroy .e |
︙ |
Changes to tests/font.test.
︙ | |||
1693 1694 1695 1696 1697 1698 1699 | 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 | - + | .t.f config -text "foo" -underline {} } -result {} test font-27.2 {Tk_UnderlineTextLayout procedure: underline not visible} -body { .t.f config -text "000 00000" -wrap [expr $ax*7] -under 10 } -result {} test font-27.3 {Tk_UnderlineTextLayout procedure: underline is visible} -body { .t.f config -text "000 00000" -wrap [expr $ax*7] -under 5 |
︙ |
Changes to tests/listbox.test.
︙ | |||
199 200 201 202 203 204 205 | 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 | - + | .l configure -highlightthickness bogus } -returnCodes error -result {expected screen distance but got "bogus"} test listbox-1.31 {configuration options} -body { .l configure -highlightthickness -2 list [lindex [.l configure -highlightthickness] 4] [.l cget -highlightthickness] } -cleanup { .l configure -highlightthickness [lindex [.l configure -highlightthickness] 3] |
︙ | |||
1238 1239 1240 1241 1242 1243 1244 | 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 | - + | pack .l update } -body { .l configure -highlightthickness -3 .l cget -highlightthickness } -cleanup { deleteWindows |
︙ |
Changes to tests/message.test.
︙ | |||
390 391 392 393 394 395 396 | 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 | - + - + | update } -body { .m configure -width badValue } -cleanup { destroy .m } -returnCodes error -result {expected screen distance but got "badValue"} test message-1.39 {configuration options, fallback to default} -setup { |
︙ |
Changes to tests/panedwindow.test.
︙ | |||
1661 1662 1663 1664 1665 1666 1667 | 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 | - + - + | # Get the new sash coord; it should have moved as far as possible, # respecting minsizes. .p sash coord 0 } -cleanup { deleteWindows } -result [list 50 0] |
︙ | |||
1796 1797 1798 1799 1800 1801 1802 | 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 | - + - + | # Get the new sash coord; it should have moved as far as possible, # respecting minsizes. .p sash coord 1 } -cleanup { deleteWindows } -result [list 42 0] |
︙ | |||
1983 1984 1985 1986 1987 1988 1989 | 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 | - + - + | # Get the new sash coord; it should have moved as far as possible, # respecting minsizes. .p sash coord 0 } -cleanup { deleteWindows } -result [list 0 50] |
︙ | |||
2126 2127 2128 2129 2130 2131 2132 | 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 | - + - + | # Get the new sash coord; it should have moved as far as possible, # respecting minsizes. .p sash coord 1 } -cleanup { deleteWindows } -result [list 0 42] |
︙ |
Changes to tests/scrollbar.test.
︙ | |||
80 81 82 83 84 85 86 | 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 | - - + | {unknown color name "non-existent"}} {-borderwidth 1.3 1.3 badValue {expected screen distance but got "badValue"}} {-command "set x" {set x} {} {}} {-elementborderwidth 4 4 badValue {expected screen distance or "" but got "badValue"}} {-cursor arrow arrow badValue {bad cursor spec "badValue"}} {-highlightbackground #112233 #112233 ugly {unknown color name "ugly"}} {-highlightcolor #123456 #123456 bogus {unknown color name "bogus"}} |
︙ |
Changes to tests/spinbox.test.
︙ | |||
476 477 478 479 480 481 482 | 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 | - + | pack .e update } -body { .e configure -highlightthickness -2 .e cget -highlightthickness } -cleanup { destroy .e |
︙ |
Changes to tests/text.test.
︙ | |||
299 300 301 302 303 304 305 | 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 | - + | pack .t update } -body { .t configure -highlightthickness -2 .t cget -highlightthickness } -cleanup { destroy .t |
︙ | |||
593 594 595 596 597 598 599 | 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 | - + | pack .t update } -body { .t configure -spacing1 -5 .t cget -spacing1 } -cleanup { destroy .t |
︙ | |||
631 632 633 634 635 636 637 | 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 | - + | pack .t update } -body { .t configure -spacing2 -1 .t cget -spacing2 } -cleanup { destroy .t |
︙ | |||
669 670 671 672 673 674 675 | 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 | - + | pack .t update } -body { .t configure -spacing3 -10 .t cget -spacing3 } -cleanup { destroy .t |
︙ | |||
3308 3309 3310 3311 3312 3313 3314 | 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 | - + - + - + | test text-14.2 {ConfigureText procedure} -setup { text .t } -body { .t configure -spacing1 -2 -spacing2 1 -spacing3 1 list [.t cget -spacing1] [.t cget -spacing2] [.t cget -spacing3] } -cleanup { destroy .t |
︙ |