Skip to content

Commit

Permalink
Merge 9.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jan.nijtmans committed Feb 19, 2025
2 parents b6bf608 + 52cc8d1 commit da2cea5
Show file tree
Hide file tree
Showing 32 changed files with 184 additions and 98 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/mac-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ env:
ERROR_ON_FAILURES: 1
jobs:
xcode:
runs-on: macos-15
runs-on: macos-14
defaults:
run:
shell: bash
Expand Down Expand Up @@ -58,7 +58,7 @@ jobs:
fi
timeout-minutes: 30
clang:
runs-on: macos-15
runs-on: macos-14
strategy:
matrix:
symbols:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/onefiledist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ permissions:
jobs:
linux:
name: Linux
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
defaults:
run:
shell: bash
Expand Down
2 changes: 2 additions & 0 deletions changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ to the userbase.
- [Bug in the ttk::scale widget of the "default" theme](https://core.tcl-lang.org/tk/tktview/126d07)
- [Wrong appearance of the ttk::menubutton indicator of the "xpnative" theme](https://core.tcl-lang.org/tk/tktview/525536)
- [English shortcuts for Chinese locale](https://core.tcl-lang.org/tk/tktview/c99266)
- [No grip element in ttk::panedwindow sashes of most built-in themes](https://core.tcl-lang.org/tk/tktview/9902d8)
- [Tk_Get3DBorderColors broken by design](https://core.tcl-lang.org/tk/tktview/517165)

Release Tk 9.0.1 arises from the check-in with tag `core-9-0-1`.

Expand Down
13 changes: 7 additions & 6 deletions generic/tk3d.c
Original file line number Diff line number Diff line change
Expand Up @@ -428,9 +428,7 @@ Tk_Free3DBorder(

prevPtr = (TkBorder *)Tcl_GetHashValue(borderPtr->hashPtr);
TkpFreeBorder(borderPtr);
if (borderPtr->bgColorPtr != NULL) {
Tk_FreeColor(borderPtr->bgColorPtr);
}
Tk_FreeColor(borderPtr->bgColorPtr);
if (borderPtr->darkColorPtr != NULL) {
Tk_FreeColor(borderPtr->darkColorPtr);
}
Expand Down Expand Up @@ -1422,14 +1420,17 @@ Tk_Get3DBorderColors(
XColor *darkColorPtr,
XColor *lightColorPtr)
{
TkBorder *borderPtr = (TkBorder *)border;
const XColor *colorPtr = borderPtr->bgColorPtr ;

if (bgColorPtr) {
*bgColorPtr = *((TkBorder *)border)->bgColorPtr;
*bgColorPtr = *colorPtr;
}
if (darkColorPtr) {
*darkColorPtr = *((TkBorder *) border)->darkColorPtr;
*darkColorPtr = borderPtr->darkColorPtr ? *borderPtr->darkColorPtr : *colorPtr;
}
if (lightColorPtr) {
*lightColorPtr = *((TkBorder *) border)->lightColorPtr;
*lightColorPtr = borderPtr->lightColorPtr ? *borderPtr->lightColorPtr : *colorPtr;
}
}

Expand Down
6 changes: 3 additions & 3 deletions generic/tkBind.c
Original file line number Diff line number Diff line change
Expand Up @@ -3824,9 +3824,9 @@ GetAllVirtualEvents(
* an XEvent, constructed from information parsed from the event
* description string and its optional arguments.
*
* argv[0] contains name of the target window.
* argv[1] contains pattern string for one event (e.g, <Control-v>).
* argv[2..argc-1] contains -field/option pairs for specifying additional
* objv[0] contains name of the target window.
* objv[1] contains pattern string for one event (e.g, <Control-v>).
* objv[2..objc-1] contains -field/option pairs for specifying additional
* detail in the generated event.
*
* Either virtual or physical events can be generated this way. The event
Expand Down
2 changes: 1 addition & 1 deletion generic/tkCanvText.c
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ static const Tk_ConfigSpec configSpecs[] = {

static void ComputeTextBbox(Tk_Canvas canvas, TextItem *textPtr);
static int ConfigureText(Tcl_Interp *interp,
Tk_Canvas canvas, Tk_Item *itemPtr, Tcl_Size argc,
Tk_Canvas canvas, Tk_Item *itemPtr, Tcl_Size objc,
Tcl_Obj *const objv[], int flags);
static int CreateText(Tcl_Interp *interp,
Tk_Canvas canvas, struct Tk_Item *itemPtr,
Expand Down
2 changes: 1 addition & 1 deletion generic/tkEntry.c
Original file line number Diff line number Diff line change
Expand Up @@ -1086,7 +1086,7 @@ DestroyEntry(
*
* ConfigureEntry --
*
* This function is called to process an argv/argc list, plus the Tk
* This function is called to process an objv/objc list, plus the Tk
* option database, in order to configure (or reconfigure) an entry
* widget.
*
Expand Down
2 changes: 1 addition & 1 deletion generic/tkFont.c
Original file line number Diff line number Diff line change
Expand Up @@ -3403,7 +3403,7 @@ noMapping: ;
*
* Side effects:
* The fields of the font attributes structure get filled in with
* information from argc/argv. If an error occurs while parsing, the font
* information from objv/objc. If an error occurs while parsing, the font
* attributes structure will contain all modifications specified in the
* command line options up to the point of the error.
*
Expand Down
8 changes: 4 additions & 4 deletions generic/tkImgGIF.c
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ FileReadGIF(
int fileWidth, fileHeight, imageWidth, imageHeight;
unsigned int nBytes;
int index = 0, result = TCL_ERROR;
Tcl_Size argc = 0, i;
Tcl_Size objc = 0, i;
Tcl_Obj **objv;
unsigned char buf[100];
unsigned char *trashBuffer = NULL;
Expand Down Expand Up @@ -455,16 +455,16 @@ FileReadGIF(
*/

if (format && Tcl_ListObjGetElements(interp, format,
&argc, &objv) != TCL_OK) {
&objc, &objv) != TCL_OK) {
return TCL_ERROR;
}
for (i = 1; i < argc; i++) {
for (i = 1; i < objc; i++) {
int optionIdx;
if (Tcl_GetIndexFromObjStruct(interp, objv[i], optionStrings,
sizeof(char *), "option name", 0, &optionIdx) != TCL_OK) {
return TCL_ERROR;
}
if (i == (argc-1)) {
if (i == (objc-1)) {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"no value given for \"%s\" option",
Tcl_GetString(objv[i])));
Expand Down
2 changes: 1 addition & 1 deletion generic/tkImgListFormat.c
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ Tk_PhotoImageFormat tkImgFmtDefault = {
* Side effects:
* The value in *indexPtr is updated to the index of the fist
* element in argv[] that does not look like an option/value, or to
* argc if parsing reached the end of argv[].
* objc if parsing reached the end of argv[].
*
*----------------------------------------------------------------------
*/
Expand Down
2 changes: 1 addition & 1 deletion generic/tkImgPhoto.c
Original file line number Diff line number Diff line change
Expand Up @@ -1576,7 +1576,7 @@ GetExtension(
* Side effects:
* Fields in *optPtr get filled in. The value of optIndexPtr is updated
* to contain the index of the first element in argv[] that was not
* parsed, or argc if the end of objv[] was reached.
* parsed, or objc if the end of objv[] was reached.
*
*----------------------------------------------------------------------
*/
Expand Down
7 changes: 3 additions & 4 deletions generic/tkMain.c
Original file line number Diff line number Diff line change
Expand Up @@ -261,8 +261,7 @@ Tk_MainEx(
if ((argc >= 3) && (0 == _tcscmp(TEXT("-encoding"), argv[1]))
&& ('-' != argv[3][0])) {
Tcl_Obj *value = NewNativeObj(argv[2]);
Tcl_SetStartupScript(NewNativeObj(argv[3]),
Tcl_GetString(value));
Tcl_SetStartupScript(NewNativeObj(argv[3]), Tcl_GetString(value));
Tcl_DecrRefCount(value);
argc -= 3;
i += 3;
Expand All @@ -281,7 +280,7 @@ Tk_MainEx(
}
Tcl_SetVar2Ex(interp, "argv0", NULL, appName, TCL_GLOBAL_ONLY);

Tcl_SetVar2Ex(interp, "argc", NULL, Tcl_NewWideIntObj((Tcl_WideInt)argc), TCL_GLOBAL_ONLY);
Tcl_SetVar2Ex(interp, "argc", NULL, Tcl_NewWideIntObj(argc), TCL_GLOBAL_ONLY);

argvPtr = Tcl_NewListObj(0, NULL);
while (argc--) {
Expand All @@ -308,7 +307,7 @@ Tk_MainEx(
}
#endif
Tcl_SetVar2Ex(interp, "tcl_interactive", NULL,
Tcl_NewWideIntObj(!path && (is.tty || nullStdin)), TCL_GLOBAL_ONLY);
Tcl_NewBooleanObj(!path && (is.tty || nullStdin)), TCL_GLOBAL_ONLY);

/*
* Invoke application-specific initialization.
Expand Down
4 changes: 2 additions & 2 deletions generic/tkMenu.c
Original file line number Diff line number Diff line change
Expand Up @@ -1560,7 +1560,7 @@ MenuWorldChanged(
*
* ConfigureMenu --
*
* This function is called to process an argv/argc list, plus the Tk
* This function is called to process an objv/objc list, plus the Tk
* option database, in order to configure (or reconfigure) a menu widget.
*
* Results:
Expand Down Expand Up @@ -1942,7 +1942,7 @@ PostProcessEntry(
*
* ConfigureMenuEntry --
*
* This function is called to process an argv/argc list in order to
* This function is called to process an objv/objc list in order to
* configure (or reconfigure) one entry in a menu.
*
* Results:
Expand Down
2 changes: 1 addition & 1 deletion generic/tkMenubutton.c
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ DestroyMenuButton(
*
* ConfigureMenuButton --
*
* This function is called to process an argv/argc list, plus the Tk
* This function is called to process an objv/objc list, plus the Tk
* option database, in order to configure (or reconfigure) a menubutton
* widget.
*
Expand Down
2 changes: 1 addition & 1 deletion generic/tkMessage.c
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ DestroyMessage(
*
* ConfigureMessage --
*
* This function is called to process an argv/argc list, plus the Tk
* This function is called to process an objv/objc list, plus the Tk
* option database, in order to configure (or reconfigure) a message
* widget.
*
Expand Down
2 changes: 1 addition & 1 deletion generic/tkPanedWindow.c
Original file line number Diff line number Diff line change
Expand Up @@ -1227,7 +1227,7 @@ PanedWindowSashCommand(
*
* ConfigurePanedWindow --
*
* This function is called to process an argv/argc list in conjunction
* This function is called to process an objv/objc list in conjunction
* with the Tk option database to configure (or reconfigure) a paned
* window widget.
*
Expand Down
2 changes: 1 addition & 1 deletion generic/tkPlace.c
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,7 @@ FindContainer(
*
* ConfigureContent --
*
* This function is called to process an argv/argc list to reconfigure
* This function is called to process an objv/objc list to reconfigure
* the placement of a window.
*
* Results:
Expand Down
2 changes: 1 addition & 1 deletion generic/tkScale.c
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,7 @@ DestroyScale(
*
* ConfigureScale --
*
* This procedure is called to process an argv/argc list, plus the Tk
* This procedure is called to process an objv/objc list, plus the Tk
* option database, in order to configure (or reconfigure) a scale
* widget.
*
Expand Down
2 changes: 1 addition & 1 deletion generic/tkScrollbar.c
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ ScrollbarWidgetObjCmd(
*
* ConfigureScrollbar --
*
* This function is called to process an argv/argc list, plus the Tk
* This function is called to process an objv/objc list, plus the Tk
* option database, in order to configure (or reconfigure) a scrollbar
* widget.
*
Expand Down
2 changes: 1 addition & 1 deletion generic/tkSquare.c
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ SquareWidgetObjCmd(
*
* SquareConfigure --
*
* This procedure is called to process an argv/argc list in conjunction
* This procedure is called to process an objv/objc list in conjunction
* with the Tk option database to configure (or reconfigure) a square
* widget.
*
Expand Down
8 changes: 0 additions & 8 deletions generic/ttk/ttkClamTheme.c
Original file line number Diff line number Diff line change
Expand Up @@ -1182,14 +1182,6 @@ TTK_LAYOUT("TCombobox",
TTK_GROUP("Combobox.padding", TTK_FILL_BOTH,
TTK_NODE("Combobox.textarea", TTK_FILL_BOTH))))

TTK_LAYOUT("Horizontal.Sash",
TTK_GROUP("Sash.hsash", TTK_FILL_BOTH,
TTK_NODE("Sash.hgrip", TTK_FILL_BOTH)))

TTK_LAYOUT("Vertical.Sash",
TTK_GROUP("Sash.vsash", TTK_FILL_BOTH,
TTK_NODE("Sash.vgrip", TTK_FILL_BOTH)))

TTK_END_LAYOUT_TABLE

/*------------------------------------------------------------------------
Expand Down
14 changes: 10 additions & 4 deletions generic/ttk/ttkClassicTheme.c
Original file line number Diff line number Diff line change
Expand Up @@ -856,15 +856,21 @@ TTK_LAYOUT("TSpinbox",
TTK_NODE("Spinbox.textarea", TTK_FILL_BOTH)))))

/* "classic" scale, includes highlight border */
TTK_LAYOUT("Horizontal.TScale",
TTK_GROUP("Horizontal.Scale.highlight", TTK_FILL_BOTH,
TTK_GROUP("Horizontal.Scale.trough", TTK_FILL_BOTH,
TTK_NODE("Horizontal.Scale.slider", TTK_PACK_LEFT))))

TTK_LAYOUT("Vertical.TScale",
TTK_GROUP("Vertical.Scale.highlight", TTK_FILL_BOTH,
TTK_GROUP("Vertical.Scale.trough", TTK_FILL_BOTH,
TTK_NODE("Vertical.Scale.slider", TTK_PACK_TOP))))

TTK_LAYOUT("Horizontal.TScale",
TTK_GROUP("Horizontal.Scale.highlight", TTK_FILL_BOTH,
TTK_GROUP("Horizontal.Scale.trough", TTK_FILL_BOTH,
TTK_NODE("Horizontal.Scale.slider", TTK_PACK_LEFT))))
TTK_LAYOUT("Horizontal.Sash",
TTK_NODE("Sash.hsash", TTK_FILL_X))

TTK_LAYOUT("Vertical.Sash",
TTK_NODE("Sash.vsash", TTK_FILL_Y))

/* put highlight border around treeview */
TTK_LAYOUT("Treeview",
Expand Down
Loading

0 comments on commit da2cea5

Please sign in to comment.