diff options
author | jenglish <jenglish@flightlab.com> | 2011-09-22 18:10:30 (GMT) |
---|---|---|
committer | jenglish <jenglish@flightlab.com> | 2011-09-22 18:10:30 (GMT) |
commit | 3d7771a4c563657f852eddc6b6e5a1e5223cd568 (patch) | |
tree | 1f3d74c51d27e678018aae35bf2e4f667359e082 /generic/ttk/ttkButton.c | |
parent | aef5d3cf9a433ab18b10d9d5770943f1cd703bd7 (diff) | |
download | tk-3d7771a4c563657f852eddc6b6e5a1e5223cd568.zip tk-3d7771a4c563657f852eddc6b6e5a1e5223cd568.tar.gz tk-3d7771a4c563657f852eddc6b6e5a1e5223cd568.tar.bz2 |
Move -takefocus option out of ttkCoreOptionSpecs,
explicitly specify it on individual widgets.
[Bug 3404541], [Bug 1204186].
Diffstat (limited to 'generic/ttk/ttkButton.c')
-rw-r--r-- | generic/ttk/ttkButton.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/generic/ttk/ttkButton.c b/generic/ttk/ttkButton.c index ae0f20a..2954184 100644 --- a/generic/ttk/ttkButton.c +++ b/generic/ttk/ttkButton.c @@ -244,6 +244,7 @@ static Tk_OptionSpec LabelOptionSpecs[] = NULL, Tk_Offset(Label, label.wrapLengthObj), -1, TK_OPTION_NULL_OK,0,GEOMETRY_CHANGED /*SB: SIZE_CHANGED*/ }, + WIDGET_TAKEFOCUS_FALSE, WIDGET_INHERIT_OPTIONS(BaseOptionSpecs) }; @@ -301,14 +302,13 @@ typedef struct */ static Tk_OptionSpec ButtonOptionSpecs[] = { - WIDGET_TAKES_FOCUS, - {TK_OPTION_STRING, "-command", "command", "Command", "", Tk_Offset(Button, button.commandObj), -1, 0,0,0}, {TK_OPTION_STRING_TABLE, "-default", "default", "Default", "normal", Tk_Offset(Button, button.defaultStateObj), -1, 0, (ClientData) ttkDefaultStrings, DEFAULTSTATE_CHANGED}, + WIDGET_TAKEFOCUS_TRUE, WIDGET_INHERIT_OPTIONS(BaseOptionSpecs) }; @@ -412,8 +412,6 @@ typedef struct */ static Tk_OptionSpec CheckbuttonOptionSpecs[] = { - WIDGET_TAKES_FOCUS, - {TK_OPTION_STRING, "-variable", "variable", "Variable", "", Tk_Offset(Checkbutton, checkbutton.variableObj), -1, TK_OPTION_DONT_SET_DEFAULT,0,0}, @@ -427,6 +425,7 @@ static Tk_OptionSpec CheckbuttonOptionSpecs[] = "", Tk_Offset(Checkbutton, checkbutton.commandObj), -1, 0,0,0}, + WIDGET_TAKEFOCUS_TRUE, WIDGET_INHERIT_OPTIONS(BaseOptionSpecs) }; @@ -613,8 +612,6 @@ typedef struct */ static Tk_OptionSpec RadiobuttonOptionSpecs[] = { - WIDGET_TAKES_FOCUS, - {TK_OPTION_STRING, "-variable", "variable", "Variable", "::selectedButton", Tk_Offset(Radiobutton, radiobutton.variableObj),-1, 0,0,0}, @@ -625,6 +622,7 @@ static Tk_OptionSpec RadiobuttonOptionSpecs[] = "", Tk_Offset(Radiobutton, radiobutton.commandObj), -1, 0,0,0}, + WIDGET_TAKEFOCUS_TRUE, WIDGET_INHERIT_OPTIONS(BaseOptionSpecs) }; @@ -789,14 +787,13 @@ static const char *const directionStrings[] = { }; static Tk_OptionSpec MenubuttonOptionSpecs[] = { - WIDGET_TAKES_FOCUS, - {TK_OPTION_STRING, "-menu", "menu", "Menu", "", Tk_Offset(Menubutton, menubutton.menuObj), -1, 0,0,0}, {TK_OPTION_STRING_TABLE, "-direction", "direction", "Direction", "below", Tk_Offset(Menubutton, menubutton.directionObj), -1, 0,(ClientData)directionStrings,GEOMETRY_CHANGED}, + WIDGET_TAKEFOCUS_TRUE, WIDGET_INHERIT_OPTIONS(BaseOptionSpecs) }; |