From 2f747aeed4a544be0d517f7e7ac3e9cf15570c2d Mon Sep 17 00:00:00 2001 From: fvogel Date: Sun, 1 Sep 2024 18:51:34 +0000 Subject: [PATCH 1/2] Rename DEF_TEXT_INACTIVE_SELECT_COLOR to DEF_TEXT_INACTIVE_SELECT_BG_COLOR in the text widget code. --- generic/tkText.c | 2 +- macosx/tkMacOSXDefault.h | 2 +- unix/tkUnixDefault.h | 2 +- win/tkWinDefault.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/generic/tkText.c b/generic/tkText.c index 013874b7a7..0b643dda40 100644 --- a/generic/tkText.c +++ b/generic/tkText.c @@ -159,7 +159,7 @@ static const Tk_OptionSpec optionSpecs[] = { Tk_Offset(TkText, highlightWidth), 0, 0, TK_TEXT_LINE_GEOMETRY}, {TK_OPTION_BORDER, "-inactiveselectbackground","inactiveSelectBackground", "Foreground", - DEF_TEXT_INACTIVE_SELECT_COLOR, + DEF_TEXT_INACTIVE_SELECT_BG_COLOR, -1, Tk_Offset(TkText, inactiveSelBorder), TK_OPTION_NULL_OK, DEF_TEXT_SELECT_MONO, 0}, {TK_OPTION_BORDER, "-insertbackground", "insertBackground", "Foreground", diff --git a/macosx/tkMacOSXDefault.h b/macosx/tkMacOSXDefault.h index e126742031..0fa94ecb13 100644 --- a/macosx/tkMacOSXDefault.h +++ b/macosx/tkMacOSXDefault.h @@ -515,7 +515,7 @@ #define DEF_TEXT_PADX "1" #define DEF_TEXT_PADY "1" #define DEF_TEXT_RELIEF "flat" -#define DEF_TEXT_INACTIVE_SELECT_COLOR INACTIVE_SELECT_BG +#define DEF_TEXT_INACTIVE_SELECT_BG_COLOR INACTIVE_SELECT_BG #define DEF_TEXT_SELECT_COLOR SELECT_BG #define DEF_TEXT_SELECT_MONO BLACK #define DEF_TEXT_SELECT_BD_COLOR "1" diff --git a/unix/tkUnixDefault.h b/unix/tkUnixDefault.h index a3d50b6694..89fed8be8e 100644 --- a/unix/tkUnixDefault.h +++ b/unix/tkUnixDefault.h @@ -486,7 +486,7 @@ #define DEF_TEXT_PADX "1" #define DEF_TEXT_PADY "1" #define DEF_TEXT_RELIEF "sunken" -#define DEF_TEXT_INACTIVE_SELECT_COLOR SELECT_BG +#define DEF_TEXT_INACTIVE_SELECT_BG_COLOR SELECT_BG #define DEF_TEXT_SELECT_COLOR SELECT_BG #define DEF_TEXT_SELECT_MONO BLACK #define DEF_TEXT_SELECT_BD_COLOR "0" diff --git a/win/tkWinDefault.h b/win/tkWinDefault.h index b03cbd7441..f8a8fecabe 100644 --- a/win/tkWinDefault.h +++ b/win/tkWinDefault.h @@ -490,7 +490,7 @@ #define DEF_TEXT_PADX "1" #define DEF_TEXT_PADY "1" #define DEF_TEXT_RELIEF "sunken" -#define DEF_TEXT_INACTIVE_SELECT_COLOR NULL +#define DEF_TEXT_INACTIVE_SELECT_BG_COLOR NULL #define DEF_TEXT_SELECT_COLOR SELECT_BG #define DEF_TEXT_SELECT_MONO BLACK #define DEF_TEXT_SELECT_BD_COLOR "0" From 3fec8cb9880cf52be2f6434f4f18bb91bfd63609 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Sun, 1 Sep 2024 19:29:07 +0000 Subject: [PATCH 2/2] Missing "const" in documentation for Tk_Get3DBorder/Tk_GetColor/Tk_GetCursor --- doc/3DBorder.3 | 2 +- doc/GetColor.3 | 2 +- doc/GetCursor.3 | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/3DBorder.3 b/doc/3DBorder.3 index f589e669e2..de036456c5 100644 --- a/doc/3DBorder.3 +++ b/doc/3DBorder.3 @@ -67,7 +67,7 @@ must be the window for which the border was allocated). Pointer to value whose value describes color corresponding to background (flat areas). Illuminated edges will be brighter than this and shadowed edges will be darker than this. -.AP char *colorName in +.AP const char *colorName in Same as \fIobjPtr\fR except value is supplied as a string rather than a value. .AP Drawable drawable in diff --git a/doc/GetColor.3 b/doc/GetColor.3 index 15254aa907..0905d4e429 100644 --- a/doc/GetColor.3 +++ b/doc/GetColor.3 @@ -44,7 +44,7 @@ Token for window in which color will be used. .AP Tcl_Obj *objPtr in/out String value describes desired color; internal rep will be modified to cache pointer to corresponding (XColor *). -.AP char *name in +.AP const char *name in Same as \fIobjPtr\fR except description of color is passed as a string and resulting (XColor *) is not cached. .AP XColor *prefPtr in diff --git a/doc/GetCursor.3 b/doc/GetCursor.3 index 403c05ee55..fdf773b78b 100644 --- a/doc/GetCursor.3 +++ b/doc/GetCursor.3 @@ -41,7 +41,7 @@ Token for window in which the cursor will be used. .AP Tcl_Obj *objPtr in/out Description of cursor; see below for possible values. Internal rep will be modified to cache pointer to corresponding Tk_Cursor. -.AP char *name in +.AP const char *name in Same as \fIobjPtr\fR except description of cursor is passed as a string and resulting Tk_Cursor is not cached. .AP "const char" *source in