diff options
-rw-r--r-- | generic/tkObj.c | 3 | ||||
-rw-r--r-- | generic/ttk/ttkButton.c | 4 | ||||
-rw-r--r-- | generic/ttk/ttkFrame.c | 4 | ||||
-rw-r--r-- | generic/ttk/ttkNotebook.c | 4 |
4 files changed, 8 insertions, 7 deletions
diff --git a/generic/tkObj.c b/generic/tkObj.c index 2df8838..a254491 100644 --- a/generic/tkObj.c +++ b/generic/tkObj.c @@ -214,7 +214,7 @@ GetTypeCache(void) * * TkGetIntForIndex -- * - * Almost the same as Tcl_GetIntForIndex, but it return an int. Accepts + * Almost the same as Tcl_GetIntForIndex, but it retrieves an int. Accepts * "" (empty string) as well. * * Results: @@ -240,6 +240,7 @@ TkGetIntForIndex( if (Tcl_GetIntForIndex(NULL, indexObj, end + lastOK, indexPtr) != TCL_OK) { const char *value = Tcl_GetString(indexObj); if (!*value) { + /* empty string */ *indexPtr = TCL_INDEX_NONE; return TCL_OK; } diff --git a/generic/ttk/ttkButton.c b/generic/ttk/ttkButton.c index c9539d4..6854132 100644 --- a/generic/ttk/ttkButton.c +++ b/generic/ttk/ttkButton.c @@ -24,7 +24,7 @@ typedef struct Tcl_Obj *textObj; Tcl_Obj *justifyObj; Tcl_Obj *textVariableObj; - int underline; + Tcl_Obj *underlineObj; Tcl_Obj *widthObj; Ttk_TraceHandle *textVariableTrace; @@ -66,7 +66,7 @@ static const Tk_OptionSpec BaseOptionSpecs[] = offsetof(Base,base.textVariableObj), TCL_INDEX_NONE, TK_OPTION_NULL_OK,0,GEOMETRY_CHANGED }, {TK_OPTION_INDEX, "-underline", "underline", "Underline", - TTK_OPTION_UNDERLINE_DEF(Base, base.underline), 0}, + TTK_OPTION_UNDERLINE_DEF(Base, base.underlineObj), 0}, {TK_OPTION_STRING, "-width", "width", "Width", NULL, offsetof(Base,base.widthObj), TCL_INDEX_NONE, TK_OPTION_NULL_OK,0,GEOMETRY_CHANGED }, diff --git a/generic/ttk/ttkFrame.c b/generic/ttk/ttkFrame.c index 942454a..48a0baf 100644 --- a/generic/ttk/ttkFrame.c +++ b/generic/ttk/ttkFrame.c @@ -235,7 +235,7 @@ static Ttk_Side LabelAnchorSide(Ttk_PositionSpec flags) typedef struct { Tcl_Obj *labelAnchorObj; Tcl_Obj *textObj; - int underline; + Tcl_Obj *underlineObj; Tk_Window labelWidget; Ttk_Manager *mgr; @@ -259,7 +259,7 @@ static const Tk_OptionSpec LabelframeOptionSpecs[] = { offsetof(Labelframe,label.textObj), TCL_INDEX_NONE, 0,0,GEOMETRY_CHANGED }, {TK_OPTION_INDEX, "-underline", "underline", "Underline", - TTK_OPTION_UNDERLINE_DEF(Labelframe, label.underline), 0}, + TTK_OPTION_UNDERLINE_DEF(Labelframe, label.underlineObj), 0}, {TK_OPTION_WINDOW, "-labelwidget", "labelWidget", "LabelWidget", NULL, TCL_INDEX_NONE, offsetof(Labelframe,label.labelWidget), TK_OPTION_NULL_OK,0,LABELWIDGET_CHANGED|GEOMETRY_CHANGED }, diff --git a/generic/ttk/ttkNotebook.c b/generic/ttk/ttkNotebook.c index 35088f8..2a2eead 100644 --- a/generic/ttk/ttkNotebook.c +++ b/generic/ttk/ttkNotebook.c @@ -44,7 +44,7 @@ typedef struct Tcl_Obj *textObj; Tcl_Obj *imageObj; Tcl_Obj *compoundObj; - int underline; + Tcl_Obj *underlineObj; } Tab; @@ -68,7 +68,7 @@ static const Tk_OptionSpec TabOptionSpecs[] = NULL, offsetof(Tab,compoundObj), TCL_INDEX_NONE, TK_OPTION_NULL_OK,ttkCompoundStrings,GEOMETRY_CHANGED }, {TK_OPTION_INDEX, "-underline", "underline", "Underline", - TTK_OPTION_UNDERLINE_DEF(Tab, underline), GEOMETRY_CHANGED}, + TTK_OPTION_UNDERLINE_DEF(Tab, underlineObj), GEOMETRY_CHANGED}, {TK_OPTION_END, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0 } }; |