diff options
author | nijtmans <nijtmans> | 2010-03-12 13:12:35 (GMT) |
---|---|---|
committer | nijtmans <nijtmans> | 2010-03-12 13:12:35 (GMT) |
commit | 32e22b3f020e202855118bde8300d02435f6cdf1 (patch) | |
tree | cb2fadc8328ffcba901ac53556ba46ae26bb6274 /generic | |
parent | 439dea6e0d6322d92e06e0f87221b8925dcc9b46 (diff) | |
download | tk-32e22b3f020e202855118bde8300d02435f6cdf1.zip tk-32e22b3f020e202855118bde8300d02435f6cdf1.tar.gz tk-32e22b3f020e202855118bde8300d02435f6cdf1.tar.bz2 |
[Bug 2956548] TkpButtonSetDefaults only initializes one button type
Fix 2 minor gcc warnings in tkWinTest.c
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tkButton.c | 12 | ||||
-rw-r--r-- | generic/tkButton.h | 6 |
2 files changed, 11 insertions, 7 deletions
diff --git a/generic/tkButton.c b/generic/tkButton.c index a26249d..357a5d6 100644 --- a/generic/tkButton.c +++ b/generic/tkButton.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkButton.c,v 1.20.2.2 2003/11/12 00:05:13 hobbs Exp $ + * RCS: @(#) $Id: tkButton.c,v 1.20.2.3 2010/03/12 13:12:35 nijtmans Exp $ */ #include "tkButton.h" @@ -56,6 +56,8 @@ static char *compoundStrings[] = { "bottom", "center", "left", "none", "right", "top", (char *) NULL }; +char tkDefButtonBorderWidth[TCL_INTEGER_SPACE] = DEF_BUTTON_BORDER_WIDTH; + /* * Information used for parsing configuration options. There is a * separate table for each of the four widget classes. @@ -81,7 +83,7 @@ static Tk_OptionSpec labelOptionSpecs[] = { DEF_BUTTON_BITMAP, -1, Tk_Offset(TkButton, bitmap), TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_PIXELS, "-borderwidth", "borderWidth", "BorderWidth", - DEF_BUTTON_BORDER_WIDTH, Tk_Offset(TkButton, borderWidthPtr), + tkDefButtonBorderWidth, Tk_Offset(TkButton, borderWidthPtr), Tk_Offset(TkButton, borderWidth), 0, 0, 0}, {TK_OPTION_STRING_TABLE, "-compound", "compound", "Compound", DEF_BUTTON_COMPOUND, -1, Tk_Offset(TkButton, compound), 0, @@ -167,7 +169,7 @@ static Tk_OptionSpec buttonOptionSpecs[] = { DEF_BUTTON_BITMAP, -1, Tk_Offset(TkButton, bitmap), TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_PIXELS, "-borderwidth", "borderWidth", "BorderWidth", - DEF_BUTTON_BORDER_WIDTH, Tk_Offset(TkButton, borderWidthPtr), + tkDefButtonBorderWidth, Tk_Offset(TkButton, borderWidthPtr), Tk_Offset(TkButton, borderWidth), 0, 0, 0}, {TK_OPTION_STRING, "-command", "command", "Command", DEF_BUTTON_COMMAND, Tk_Offset(TkButton, commandPtr), -1, @@ -269,7 +271,7 @@ static Tk_OptionSpec checkbuttonOptionSpecs[] = { DEF_BUTTON_BITMAP, -1, Tk_Offset(TkButton, bitmap), TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_PIXELS, "-borderwidth", "borderWidth", "BorderWidth", - DEF_BUTTON_BORDER_WIDTH, Tk_Offset(TkButton, borderWidthPtr), + tkDefButtonBorderWidth, Tk_Offset(TkButton, borderWidthPtr), Tk_Offset(TkButton, borderWidth), 0, 0, 0}, {TK_OPTION_STRING, "-command", "command", "Command", DEF_BUTTON_COMMAND, Tk_Offset(TkButton, commandPtr), -1, @@ -378,7 +380,7 @@ static Tk_OptionSpec radiobuttonOptionSpecs[] = { DEF_BUTTON_BITMAP, -1, Tk_Offset(TkButton, bitmap), TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_PIXELS, "-borderwidth", "borderWidth", "BorderWidth", - DEF_BUTTON_BORDER_WIDTH, Tk_Offset(TkButton, borderWidthPtr), + tkDefButtonBorderWidth, Tk_Offset(TkButton, borderWidthPtr), Tk_Offset(TkButton, borderWidth), 0, 0, 0}, {TK_OPTION_STRING, "-command", "command", "Command", DEF_BUTTON_COMMAND, Tk_Offset(TkButton, commandPtr), -1, diff --git a/generic/tkButton.h b/generic/tkButton.h index d0ecfea..94aa593 100644 --- a/generic/tkButton.h +++ b/generic/tkButton.h @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkButton.h,v 1.9.2.1 2003/04/26 02:53:46 hobbs Exp $ + * RCS: @(#) $Id: tkButton.h,v 1.9.2.2 2010/03/12 13:12:35 nijtmans Exp $ */ #ifndef _TKBUTTON @@ -287,10 +287,12 @@ typedef struct { #define GOT_FOCUS (1 << 2) #define BUTTON_DELETED (1 << 3) /* - * Declaration of variables shared between the files in the button module. + * Declaration of button class functions structure + * and button/label defaults, for use in optionSpecs. */ extern Tk_ClassProcs tkpButtonProcs; +extern char tkDefButtonBorderWidth[TCL_INTEGER_SPACE]; /* * Declaration of procedures used in the implementation of the button |