diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2012-06-19 10:29:25 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2012-06-19 10:29:25 (GMT) |
commit | 9389cc709a38a39f1dbd50e744342ee2590269f8 (patch) | |
tree | 71968a06df024ea74a2bc06c881ffd4d50c04891 /generic/tkButton.c | |
parent | 8a539b981722705710128c18bb03787afa71847f (diff) | |
parent | e8469505b13e2af380977e581f42402073a2136f (diff) | |
download | tk-9389cc709a38a39f1dbd50e744342ee2590269f8.zip tk-9389cc709a38a39f1dbd50e744342ee2590269f8.tar.gz tk-9389cc709a38a39f1dbd50e744342ee2590269f8.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.c | 20 |
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; } |