From 5a8964b65da050a0e1836de423c886b1b2de62aa Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Fri, 22 Dec 2023 09:52:20 +0000 Subject: int -> Tcl_Size in menu handling --- generic/tkMacWinMenu.c | 2 +- generic/tkMenu.c | 36 +++++++++++++++++++----------------- generic/tkMenu.h | 4 ++-- macosx/tkMacOSXMenu.c | 18 +++++++++--------- unix/tkUnixMenu.c | 22 ++++++++++++---------- win/tkWinMenu.c | 38 +++++++++++++++++++------------------- 6 files changed, 62 insertions(+), 58 deletions(-) diff --git a/generic/tkMacWinMenu.c b/generic/tkMacWinMenu.c index eb8eb2f..848e09b 100644 --- a/generic/tkMacWinMenu.c +++ b/generic/tkMacWinMenu.c @@ -66,7 +66,7 @@ PreprocessMenu( do { finished = 1; - for (index = 0; index < (int)menuPtr->numEntries; index++) { + for (index = 0; index < menuPtr->numEntries; index++) { TkMenuEntry *entryPtr = menuPtr->entries[index]; if ((entryPtr->type == CASCADE_ENTRY) diff --git a/generic/tkMenu.c b/generic/tkMenu.c index 04c49aa..477a99b 100644 --- a/generic/tkMenu.c +++ b/generic/tkMenu.c @@ -323,11 +323,11 @@ enum options { static int CloneMenu(TkMenu *menuPtr, Tcl_Obj *newMenuName, Tcl_Obj *newMenuTypeString); static int ConfigureMenu(Tcl_Interp *interp, TkMenu *menuPtr, - int objc, Tcl_Obj *const objv[]); + Tcl_Size objc, Tcl_Obj *const objv[]); static int ConfigureMenuCloneEntries(TkMenu *menuPtr, int index, - int objc, Tcl_Obj *const objv[]); + Tcl_Size objc, Tcl_Obj *const objv[]); static int ConfigureMenuEntry(TkMenuEntry *mePtr, - int objc, Tcl_Obj *const objv[]); + Tcl_Size objc, Tcl_Obj *const objv[]); static void DeleteMenuCloneEntries(TkMenu *menuPtr, int first, int last); static void DestroyMenuHashTable(void *clientData, @@ -342,7 +342,7 @@ static int MenuDoYPosition(Tcl_Interp *interp, static int MenuDoXPosition(Tcl_Interp *interp, TkMenu *menuPtr, Tcl_Obj *objPtr); static int MenuAddOrInsert(Tcl_Interp *interp, - TkMenu *menuPtr, Tcl_Obj *indexPtr, int objc, + TkMenu *menuPtr, Tcl_Obj *indexPtr, Tcl_Size objc, Tcl_Obj *const objv[]); static void MenuCmdDeletedProc(void *clientData); static TkMenuEntry * MenuNewEntry(TkMenu *menuPtr, Tcl_Size index, int type); @@ -401,7 +401,8 @@ Tk_MenuObjCmd( Tk_Window newWin; TkMenu *menuPtr; TkMenuReferences *menuRefPtr; - int i, index, toplevel; + Tcl_Size i; + int index, toplevel; const char *windowName; static const char *const typeStringList[] = {"-type", NULL}; ThreadSpecificData *tsdPtr = (ThreadSpecificData *) @@ -1564,7 +1565,7 @@ ConfigureMenu( Tcl_Interp *interp, /* Used for error reporting. */ TkMenu *menuPtr, /* Information about widget; may or may not * already have values for some fields. */ - int objc, /* Number of valid entries in argv. */ + Tcl_Size objc, /* Number of valid entries in argv. */ Tcl_Obj *const objv[]) /* Arguments. */ { int i; @@ -1669,7 +1670,7 @@ ConfigureMenu( Tcl_EventuallyFree(menuListPtr->entries[0], DestroyMenuEntry); - for (i = 0; i < (int)menuListPtr->numEntries - 1; i++) { + for (i = 0; i < menuListPtr->numEntries - 1; i++) { menuListPtr->entries[i] = menuListPtr->entries[i + 1]; menuListPtr->entries[i]->index = i; } @@ -1688,7 +1689,7 @@ ConfigureMenu( * parent. */ - for (i = 0; i < (int)menuListPtr->numEntries; i++) { + for (i = 0; i < menuListPtr->numEntries; i++) { TkMenuEntry *mePtr; mePtr = menuListPtr->entries[i]; @@ -1945,7 +1946,7 @@ static int ConfigureMenuEntry( TkMenuEntry *mePtr,/* Information about menu entry; may or may * not already have values for some fields. */ - int objc, /* Number of valid entries in argv. */ + Tcl_Size objc, /* Number of valid entries in argv. */ Tcl_Obj *const objv[]) /* Arguments. */ { TkMenu *menuPtr = mePtr->menuPtr; @@ -2008,7 +2009,7 @@ static int ConfigureMenuCloneEntries( TkMenu *menuPtr, /* Information about whole menu. */ int index, /* Index of mePtr within menuPtr's entries. */ - int objc, /* Number of valid entries in argv. */ + Tcl_Size objc, /* Number of valid entries in argv. */ Tcl_Obj *const objv[]) /* Arguments. */ { TkMenuEntry *mePtr; @@ -2155,7 +2156,7 @@ GetMenuIndex( * *after* last entry. */ Tcl_Size *indexPtr) /* Where to store converted index. */ { - int i; + Tcl_Size i; const char *string; Tcl_HashEntry *entryPtr; @@ -2206,7 +2207,7 @@ GetMenuIndex( return TCL_OK; } - for (i = 0; i < (int)menuPtr->numEntries; i++) { + for (i = 0; i < menuPtr->numEntries; i++) { Tcl_Obj *labelPtr = menuPtr->entries[i]->labelPtr; const char *label = (labelPtr == NULL) ? NULL : Tcl_GetString(labelPtr); @@ -2386,7 +2387,7 @@ MenuAddOrInsert( TkMenu *menuPtr, /* Widget in which to create new entry. */ Tcl_Obj *indexPtr, /* Object describing index at which to insert. * NULL means insert at end. */ - int objc, /* Number of elements in objv. */ + Tcl_Size objc, /* Number of elements in objv. */ Tcl_Obj *const objv[]) /* Arguments to command: first arg is type of * entry, others are config options. */ { @@ -3032,7 +3033,8 @@ GetIndexFromCoords( const char *string, /* The @string we are parsing. */ Tcl_Size *indexPtr) /* The index of the item that matches. */ { - int x, y, i; + int x, y; + Tcl_Size i; const char *p; const char *rest; int x2, borderwidth, max; @@ -3068,7 +3070,7 @@ GetIndexFromCoords( ? Tk_Width(menuPtr->tkwin) : Tk_ReqWidth(menuPtr->tkwin); max -= borderwidth; - for (i = 0; i < (int)menuPtr->numEntries; i++) { + for (i = 0; i < menuPtr->numEntries; i++) { if (menuPtr->entries[i]->entryFlags & ENTRY_LAST_COLUMN) { x2 = max; } else { @@ -3607,7 +3609,7 @@ DeleteMenuCloneEntries( int last) /* The zero-based last entry. */ { TkMenu *menuListPtr; - int numDeleted, i, j; + Tcl_Size numDeleted, i, j; numDeleted = last + 1 - first; for (menuListPtr = menuPtr->mainMenuPtr; menuListPtr != NULL; @@ -3615,7 +3617,7 @@ DeleteMenuCloneEntries( for (i = last; i >= first; i--) { Tcl_EventuallyFree(menuListPtr->entries[i], DestroyMenuEntry); } - for (i = last + 1; i < (int)menuListPtr->numEntries; i++) { + for (i = last + 1; i < menuListPtr->numEntries; i++) { j = i - numDeleted; menuListPtr->entries[j] = menuListPtr->entries[i]; menuListPtr->entries[j]->index = j; diff --git a/generic/tkMenu.h b/generic/tkMenu.h index f459277..ffe6770 100644 --- a/generic/tkMenu.h +++ b/generic/tkMenu.h @@ -541,9 +541,9 @@ MODULE_SCOPE void TkpMenuInit(void); MODULE_SCOPE int TkpMenuNewEntry(TkMenuEntry *mePtr); MODULE_SCOPE int TkpNewMenu(TkMenu *menuPtr); MODULE_SCOPE int TkpPostMenu(Tcl_Interp *interp, TkMenu *menuPtr, - int x, int y, int index); + int x, int y, Tcl_Size index); MODULE_SCOPE int TkpPostTearoffMenu(Tcl_Interp *interp, TkMenu *menuPtr, - int x, int y, int index); + int x, int y, Tcl_Size index); MODULE_SCOPE void TkpSetWindowMenuBar(Tk_Window tkwin, TkMenu *menuPtr); #endif /* _TKMENU */ diff --git a/macosx/tkMacOSXMenu.c b/macosx/tkMacOSXMenu.c index 45ae1e6..1908bb9 100644 --- a/macosx/tkMacOSXMenu.c +++ b/macosx/tkMacOSXMenu.c @@ -935,7 +935,7 @@ TkpPostMenu( int x, int y, /* The screen coordinates where the top left * corner of the menu, or of the specified * entry, will be located. */ - int index) + Tcl_Size index) { int result; Tk_Window realWin = menuPtr->tkwin; @@ -1029,7 +1029,7 @@ int TkpPostTearoffMenu( TCL_UNUSED(Tcl_Interp *), /* The interpreter this menu lives in */ TkMenu *menuPtr, /* The menu we are posting */ - int x, int y, int index) /* The screen coordinates where the top left + int x, int y, Tcl_Size index) /* The screen coordinates where the top left * corner of the menu, or of the specified * entry, will be located. */ { @@ -1057,7 +1057,7 @@ TkpPostTearoffMenu( * at the given coordinates. */ - if (index < 0 || (Tcl_Size)index >= menuPtr->numEntries) { + if (index < 0 || index >= menuPtr->numEntries) { index = menuPtr->numEntries - 1; } if (index >= 0) { @@ -1402,8 +1402,8 @@ TkpComputeStandardMenuGeometry( Tk_FontMetrics menuMetrics, entryMetrics; int modifierCharWidth, menuModifierCharWidth; int x, y, modifierWidth, labelWidth, indicatorSpace; - int windowWidth, windowHeight, accelWidth; - int i, maxWidth; + int windowWidth, maxWidth, windowHeight, accelWidth; + Tcl_Size i; int entryWidth, maxIndicatorSpace, borderWidth, activeBorderWidth; TkMenuEntry *mePtr; int haveAccel = 0; @@ -1439,7 +1439,7 @@ TkpComputeStandardMenuGeometry( Tk_GetFontMetrics(menuFont, &menuMetrics); menuModifierCharWidth = ModifierCharWidth(menuFont); - for (i = 0; i < (int) menuPtr->numEntries; i++) { + for (i = 0; i < menuPtr->numEntries; i++) { mePtr = menuPtr->entries[i]; if (mePtr->type == CASCADE_ENTRY || mePtr->accelLength > 0) { haveAccel = 1; @@ -1447,7 +1447,7 @@ TkpComputeStandardMenuGeometry( } } - for (i = 0; i < (int) menuPtr->numEntries; i++) { + for (i = 0; i < menuPtr->numEntries; i++) { mePtr = menuPtr->entries[i]; if (mePtr->type == TEAROFF_ENTRY) { continue; @@ -1671,10 +1671,10 @@ void RecursivelyClearActiveMenu( TkMenu *menuPtr) /* The menu to reset. */ { - int i; + Tcl_Size i; TkActivateMenuEntry(menuPtr, TCL_INDEX_NONE); - for (i = 0; i < (int) menuPtr->numEntries; i++) { + for (i = 0; i < menuPtr->numEntries; i++) { TkMenuEntry *mePtr = menuPtr->entries[i]; if (mePtr->type == CASCADE_ENTRY diff --git a/unix/tkUnixMenu.c b/unix/tkUnixMenu.c index 7f9ad7d..4ae343c 100644 --- a/unix/tkUnixMenu.c +++ b/unix/tkUnixMenu.c @@ -906,7 +906,7 @@ int TkpPostMenu( Tcl_Interp *interp, TkMenu *menuPtr, - int x, int y, int index) + int x, int y, Tcl_Size index) { return TkpPostTearoffMenu(interp, menuPtr, x, y, index); } @@ -936,7 +936,7 @@ int TkpPostTearoffMenu( TCL_UNUSED(Tcl_Interp *), /* The interpreter of the menu */ TkMenu *menuPtr, /* The menu we are posting */ - int x, int y, int index) /* The root X,Y coordinates where the + int x, int y, Tcl_Size index) /* The root X,Y coordinates where the * specified entry will be posted */ { int vRootX, vRootY, vRootWidth, vRootHeight; @@ -963,7 +963,7 @@ TkpPostTearoffMenu( * at the given coordinates. */ - if (index >= (int)menuPtr->numEntries) { + if (index >= menuPtr->numEntries) { index = menuPtr->numEntries - 1; } if (index >= 0) { @@ -1098,8 +1098,9 @@ TkpComputeMenubarGeometry( { Tk_Font tkfont, menuFont; Tk_FontMetrics menuMetrics, entryMetrics, *fmPtr; - int width, height, i, j, x, y, currentRowHeight, maxWidth; - int maxWindowWidth, lastRowBreak, lastEntry; + int width, height, x, y, currentRowHeight, maxWidth; + Tcl_Size i, j, lastRowBreak; + int maxWindowWidth, lastEntry; int activeBorderWidth, helpMenuIndex = -1; TkMenuEntry *mePtr; @@ -1137,7 +1138,7 @@ TkpComputeMenubarGeometry( menuFont = Tk_GetFontFromObj(menuPtr->tkwin, menuPtr->fontPtr); Tk_GetFontMetrics(menuFont, &menuMetrics); - for (i = 0; i < (int)menuPtr->numEntries; i++) { + for (i = 0; i < menuPtr->numEntries; i++) { mePtr = menuPtr->entries[i]; mePtr->entryFlags &= ~ENTRY_LAST_COLUMN; if (mePtr->fontPtr != NULL) { @@ -1214,7 +1215,7 @@ TkpComputeMenubarGeometry( maxWidth = x + menuPtr->entries[lastEntry]->width + borderWidth; } x = borderWidth; - for (j = lastRowBreak; j < (int)menuPtr->numEntries; j++) { + for (j = lastRowBreak; j < menuPtr->numEntries; j++) { if (j == helpMenuIndex) { continue; } @@ -1685,7 +1686,8 @@ TkpComputeStandardMenuGeometry( Tk_Font tkfont, menuFont; Tk_FontMetrics menuMetrics, entryMetrics, *fmPtr; int x, y, height, width, indicatorSpace, labelWidth, accelWidth; - int windowWidth, windowHeight, accelSpace, i, j, lastColumnBreak = 0; + int windowWidth, windowHeight, accelSpace; + Tcl_Size i, j, lastColumnBreak = 0; TkMenuEntry *mePtr; int borderWidth, activeBorderWidth; @@ -1715,7 +1717,7 @@ TkpComputeStandardMenuGeometry( Tk_GetFontMetrics(menuFont, &menuMetrics); accelSpace = Tk_TextWidth(menuFont, "M", 1); - for (i = 0; i < (int)menuPtr->numEntries; i++) { + for (i = 0; i < menuPtr->numEntries; i++) { mePtr = menuPtr->entries[i]; if (mePtr->fontPtr == NULL) { tkfont = menuFont; @@ -1810,7 +1812,7 @@ TkpComputeStandardMenuGeometry( if (accelWidth != 0) { labelWidth += accelSpace; } - for (j = lastColumnBreak; j < (int)menuPtr->numEntries; j++) { + for (j = lastColumnBreak; j < menuPtr->numEntries; j++) { menuPtr->entries[j]->indicatorSpace = indicatorSpace; menuPtr->entries[j]->labelWidth = labelWidth; menuPtr->entries[j]->width = indicatorSpace + labelWidth diff --git a/win/tkWinMenu.c b/win/tkWinMenu.c index 96b3e1c..755033d 100644 --- a/win/tkWinMenu.c +++ b/win/tkWinMenu.c @@ -764,7 +764,7 @@ int TkpPostMenu( TCL_UNUSED(Tcl_Interp *), TkMenu *menuPtr, - int x, int y, int index) + int x, int y, Tcl_Size index) { HMENU winMenuHdl = (HMENU) menuPtr->platformData; int result, flags; @@ -784,7 +784,7 @@ TkpPostMenu( return result; } - if (index >= (int)menuPtr->numEntries) { + if (index >= menuPtr->numEntries) { index = menuPtr->numEntries - 1; } if (index >= 0) { @@ -874,7 +874,7 @@ int TkpPostTearoffMenu( TCL_UNUSED(Tcl_Interp *), /* The interpreter of the menu */ TkMenu *menuPtr, /* The menu we are posting */ - int x, int y, int index) /* The root X,Y coordinates where we are + int x, int y, Tcl_Size index) /* The root X,Y coordinates where we are * posting */ { int vRootX, vRootY, vRootWidth, vRootHeight; @@ -901,7 +901,7 @@ TkpPostTearoffMenu( * at the given coordinates. */ - if (index >= (int)menuPtr->numEntries) { + if (index >= menuPtr->numEntries) { index = menuPtr->numEntries - 1; } if (index >= 0) { @@ -1406,21 +1406,21 @@ TkWinHandleMenuEvent( } if (menuPtr != NULL) { - long entryIndex = LOWORD(*pwParam); - - if ((menuPtr->menuType == MENUBAR) && menuPtr->tearoff) { - /* - * Windows passes the entry index starting at 0 for - * the first menu entry. However this entry #0 is the - * tearoff entry for Tk (the menu has -tearoff 1), - * which is ignored for MENUBAR menues on Windows. - */ - - entryIndex++; - } - mePtr = NULL; + Tcl_Size entryIndex = LOWORD(*pwParam); + + if ((menuPtr->menuType == MENUBAR) && menuPtr->tearoff) { + /* + * Windows passes the entry index starting at 0 for + * the first menu entry. However this entry #0 is the + * tearoff entry for Tk (the menu has -tearoff 1), + * which is ignored for MENUBAR menues on Windows. + */ + + entryIndex++; + } + mePtr = NULL; if (flags != 0xFFFF) { - if ((flags&MF_POPUP) && (entryIndex < (int)menuPtr->numEntries)) { + if ((flags&MF_POPUP) && (entryIndex < menuPtr->numEntries)) { mePtr = menuPtr->entries[entryIndex]; } else { hashEntryPtr = Tcl_FindHashEntry(&tsdPtr->commandTable, @@ -2982,7 +2982,7 @@ TkpComputeStandardMenuGeometry( Tk_FontMetrics menuMetrics, entryMetrics, *fmPtr; int x, y, height, width, indicatorSpace, labelWidth, accelWidth; int windowWidth, windowHeight, accelSpace; - int i, j, lastColumnBreak = 0; + Tcl_Size i, j, lastColumnBreak = 0; int activeBorderWidth, borderWidth; if (menuPtr->tkwin == NULL) { -- cgit v0.12 From 96f5396c44f5802018117de2cee688ab61ec42c0 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Fri, 22 Dec 2023 10:31:35 +0000 Subject: (cherry-pick): Make sure that the zip-file is attached to tk87.dll for non-static builds too --- win/makefile.vc | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/win/makefile.vc b/win/makefile.vc index 5a5929e..76f05da 100644 --- a/win/makefile.vc +++ b/win/makefile.vc @@ -108,7 +108,7 @@ USING_PRE87_TCL = 1 # Extra makefile options processing for non-standard OPTS values ... !if "$(OPTS)" == "" || [nmakehlp -f "$(OPTS)" "none"] TTK_SQUARE_WIDGET = 0 -TK_EMBED_SCRIPTS = $(STATIC_BUILD) +TK_EMBED_SCRIPTS = 1 !else !if [nmakehlp -f "$(OPTS)" "square"] !message *** Include ttk square demo widget @@ -121,7 +121,7 @@ TTK_SQUARE_WIDGET = 0 TK_EMBED_SCRIPTS = 0 !else !message *** Tk script library will be appended to the binary. -TK_EMBED_SCRIPTS = $(STATIC_BUILD) +TK_EMBED_SCRIPTS = 1 !endif !endif @@ -376,9 +376,6 @@ libtkzip: setup $(TKSCRIPTZIP) embed: setup $(WISH) $(WISHSCRIPTZIP) @copy /y /b "$(WISH)"+"$(WISHSCRIPTZIP)" "$(WISH)" !else -# Note this is currently dead code as TK_EMBED_SCRIPTS is always 0 -# for non-static builds as the C code does not currently setup up -# a VFS for a non-static wish. embed: setup $(TKLIB) $(TKSCRIPTZIP) @copy /y /b "$(TKLIB)"+"$(TKSCRIPTZIP)" "$(TKLIB)" !endif -- cgit v0.12 From c0fe491025571aa1b4af422d0122eaacdb944396 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Fri, 22 Dec 2023 16:45:07 +0000 Subject: Fix [9c57421be8]: -relief strange behavior in scrollbar. Enhance Tcl_GetRelief() such that "interp" and "reliefPtr" are allowed to be NULL --- generic/tk3d.c | 41 ++++++++++++++++++++++++----------------- tests/canvas.test | 6 +++--- 2 files changed, 27 insertions(+), 20 deletions(-) diff --git a/generic/tk3d.c b/generic/tk3d.c index f1cc8f1..65980e6 100644 --- a/generic/tk3d.c +++ b/generic/tk3d.c @@ -637,8 +637,7 @@ Tk_GetReliefFromObj( * * Results: * A standard Tcl return value. If all goes well then *reliefPtr is - * filled in with one of the values TK_RELIEF_RAISED, TK_RELIEF_FLAT, or - * TK_RELIEF_SUNKEN. + * filled in with one of the values TK_RELIEF_* * * Side effects: * None. @@ -654,30 +653,38 @@ Tk_GetRelief( { char c; size_t length; + int relief; c = name[0]; length = strlen(name); if ((c == 'f') && (strncmp(name, "flat", length) == 0)) { - *reliefPtr = TK_RELIEF_FLAT; - } else if ((c == 'g') && (strncmp(name, "groove", length) == 0) - && (length >= 2)) { - *reliefPtr = TK_RELIEF_GROOVE; + relief = TK_RELIEF_FLAT; + } else if ((c == 'g') && (strncmp(name, "groove", length) == 0)) { + relief = TK_RELIEF_GROOVE; } else if ((c == 'r') && (strncmp(name, "raised", length) == 0) && (length >= 2)) { - *reliefPtr = TK_RELIEF_RAISED; - } else if ((c == 'r') && (strncmp(name, "ridge", length) == 0)) { - *reliefPtr = TK_RELIEF_RIDGE; - } else if ((c == 's') && (strncmp(name, "solid", length) == 0)) { - *reliefPtr = TK_RELIEF_SOLID; - } else if ((c == 's') && (strncmp(name, "sunken", length) == 0)) { - *reliefPtr = TK_RELIEF_SUNKEN; + relief = TK_RELIEF_RAISED; + } else if ((c == 'r') && (strncmp(name, "ridge", length) == 0) + && (length >= 2)) { + relief = TK_RELIEF_RIDGE; + } else if ((c == 's') && (strncmp(name, "solid", length) == 0) + && (length >= 2)) { + relief = TK_RELIEF_SOLID; + } else if ((c == 's') && (strncmp(name, "sunken", length) == 0) + && (length >= 2)) { + relief = TK_RELIEF_SUNKEN; } else { - Tcl_SetObjResult(interp, - Tcl_ObjPrintf("bad relief \"%.50s\": must be %s", - name, "flat, groove, raised, ridge, solid, or sunken")); - Tcl_SetErrorCode(interp, "TK", "VALUE", "RELIEF", NULL); + if (interp) { + Tcl_SetObjResult(interp, + Tcl_ObjPrintf("bad relief \"%.50s\": must be %s", + name, "flat, groove, raised, ridge, solid, or sunken")); + Tcl_SetErrorCode(interp, "TK", "VALUE", "RELIEF", NULL); + } return TCL_ERROR; } + if (reliefPtr) { + *reliefPtr = relief; + } return TCL_OK; } diff --git a/tests/canvas.test b/tests/canvas.test index 8d4f64c..1224516 100644 --- a/tests/canvas.test +++ b/tests/canvas.test @@ -133,12 +133,12 @@ test canvas-1.32 {configuration options: bad value for "insertwidth"} -body { .c configure -insertwidth 6x } -returnCodes error -result {bad screen distance "6x"} test canvas-1.33 {configuration options: good value for "relief"} -body { - .c configure -relief groove + .c configure -relief g .c cget -relief } -result {groove} test canvas-1.34 {configuration options: bad value for "relief"} -body { - .c configure -relief 1.5 -} -returnCodes error -result {bad relief "1.5": must be flat, groove, raised, ridge, solid, or sunken} + .c configure -relief r +} -returnCodes error -result {bad relief "r": must be flat, groove, raised, ridge, solid, or sunken} test canvas-1.35 {configuration options: good value for "selectbackground"} -body { .c configure -selectbackground #110022 .c cget -selectbackground -- cgit v0.12