summaryrefslogtreecommitdiffstats
path: root/generic/tkButton.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2012-06-19 09:55:18 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2012-06-19 09:55:18 (GMT)
commite8469505b13e2af380977e581f42402073a2136f (patch)
tree047c7883c2e3add51b74078a8e69f0012cc4645c /generic/tkButton.c
parentc8f0062c64f9fc019a92e9bbc8918aa3e4ba1571 (diff)
downloadtk-e8469505b13e2af380977e581f42402073a2136f.zip
tk-e8469505b13e2af380977e581f42402073a2136f.tar.gz
tk-e8469505b13e2af380977e581f42402073a2136f.tar.bz2
SetOptions.3: minor doc fix
make various other tables CONST (All backported from Tk 8.6)
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 e844cec..9a261e9 100644
--- a/generic/tkButton.c
+++ b/generic/tkButton.c
@@ -25,14 +25,14 @@ static Tcl_ThreadDataKey dataKey;
* in 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", (char *) NULL
};
@@ -41,7 +41,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", (char *) NULL
};
@@ -50,7 +50,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", (char *) NULL
};
@@ -61,7 +61,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[] = {
(char *) 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},
@@ -249,7 +249,7 @@ static Tk_OptionSpec buttonOptionSpecs[] = {
(char *) 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},
@@ -358,7 +358,7 @@ static Tk_OptionSpec checkbuttonOptionSpecs[] = {
(char *) 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},
@@ -472,7 +472,7 @@ static Tk_OptionSpec radiobuttonOptionSpecs[] = {
* class of widgets.
*/
-static Tk_OptionSpec *optionSpecs[] = {
+static CONST Tk_OptionSpec *CONST optionSpecs[] = {
labelOptionSpecs,
buttonOptionSpecs,
checkbuttonOptionSpecs,
@@ -631,7 +631,7 @@ ButtonCreate(clientData, interp, objc, objv, type)
Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));
if (!tsdPtr->defaultsInitialized) {
- TkpButtonSetDefaults(optionSpecs[type]);
+ TkpButtonSetDefaults(NULL);
tsdPtr->defaultsInitialized = 1;
}