summaryrefslogtreecommitdiffstats
path: root/generic/tkButton.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tkButton.c')
-rw-r--r--generic/tkButton.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/generic/tkButton.c b/generic/tkButton.c
index 4e3c06c..9e3a08d 100644
--- a/generic/tkButton.c
+++ b/generic/tkButton.c
@@ -26,14 +26,14 @@ static Tcl_ThreadDataKey dataKey;
* tkButton.h.
*/
-static const char *classNames[] = {"Label", "Button", "Checkbutton", "Radiobutton"};
+static const char *const classNames[] = {"Label", "Button", "Checkbutton", "Radiobutton"};
/*
* The following table defines the legal values for the -default option. It is
* used together with the "enum defaultValue" declaration in tkButton.h.
*/
-static const char *defaultStrings[] = {
+static const char *const defaultStrings[] = {
"active", "disabled", "normal", NULL
};
@@ -42,7 +42,7 @@ static const char *defaultStrings[] = {
* It is used together with the "enum state" declaration in tkButton.h.
*/
-static const char *stateStrings[] = {
+static const char *const stateStrings[] = {
"active", "disabled", "normal", NULL
};
@@ -51,7 +51,7 @@ static const char *stateStrings[] = {
* It is used with the "enum compound" declaration in tkButton.h
*/
-static const char *compoundStrings[] = {
+static const char *const compoundStrings[] = {
"bottom", "center", "left", "none", "right", "top", NULL
};
@@ -62,7 +62,7 @@ char tkDefButtonBorderWidth[TCL_INTEGER_SPACE] = DEF_BUTTON_BORDER_WIDTH;
* separate table for each of the four widget classes.
*/
-static Tk_OptionSpec labelOptionSpecs[] = {
+static const Tk_OptionSpec labelOptionSpecs[] = {
{TK_OPTION_BORDER, "-activebackground", "activeBackground", "Foreground",
DEF_BUTTON_ACTIVE_BG_COLOR, -1, Tk_Offset(TkButton, activeBorder),
0, (ClientData) DEF_BUTTON_ACTIVE_BG_MONO, 0},
@@ -147,7 +147,7 @@ static Tk_OptionSpec labelOptionSpecs[] = {
{TK_OPTION_END, NULL, NULL, NULL, NULL, 0, 0, 0, 0}
};
-static Tk_OptionSpec buttonOptionSpecs[] = {
+static const Tk_OptionSpec buttonOptionSpecs[] = {
{TK_OPTION_BORDER, "-activebackground", "activeBackground", "Foreground",
DEF_BUTTON_ACTIVE_BG_COLOR, -1, Tk_Offset(TkButton, activeBorder),
0, (ClientData) DEF_BUTTON_ACTIVE_BG_MONO, 0},
@@ -248,7 +248,7 @@ static Tk_OptionSpec buttonOptionSpecs[] = {
{TK_OPTION_END, NULL, NULL, NULL, NULL, 0, -1, 0, 0, 0}
};
-static Tk_OptionSpec checkbuttonOptionSpecs[] = {
+static const Tk_OptionSpec checkbuttonOptionSpecs[] = {
{TK_OPTION_BORDER, "-activebackground", "activeBackground", "Foreground",
DEF_BUTTON_ACTIVE_BG_COLOR, -1, Tk_Offset(TkButton, activeBorder),
0, (ClientData) DEF_BUTTON_ACTIVE_BG_MONO, 0},
@@ -361,7 +361,7 @@ static Tk_OptionSpec checkbuttonOptionSpecs[] = {
{TK_OPTION_END, NULL, NULL, NULL, NULL, 0, -1, 0, 0, 0}
};
-static Tk_OptionSpec radiobuttonOptionSpecs[] = {
+static const Tk_OptionSpec radiobuttonOptionSpecs[] = {
{TK_OPTION_BORDER, "-activebackground", "activeBackground", "Foreground",
DEF_BUTTON_ACTIVE_BG_COLOR, -1, Tk_Offset(TkButton, activeBorder),
0, (ClientData) DEF_BUTTON_ACTIVE_BG_MONO, 0},
@@ -478,7 +478,7 @@ static Tk_OptionSpec radiobuttonOptionSpecs[] = {
* such as TYPE_LABEL, to the option template for that class of widgets.
*/
-static Tk_OptionSpec * const optionSpecs[] = {
+static const Tk_OptionSpec *const optionSpecs[] = {
labelOptionSpecs,
buttonOptionSpecs,
checkbuttonOptionSpecs,
@@ -637,7 +637,7 @@ ButtonCreate(
Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));
if (!tsdPtr->defaultsInitialized) {
- TkpButtonSetDefaults(optionSpecs[type]);
+ TkpButtonSetDefaults(NULL);
tsdPtr->defaultsInitialized = 1;
}