summaryrefslogtreecommitdiffstats
path: root/generic/ttk/ttkNotebook.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/ttk/ttkNotebook.c')
-rw-r--r--generic/ttk/ttkNotebook.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/generic/ttk/ttkNotebook.c b/generic/ttk/ttkNotebook.c
index d0151f7..95125d3 100644
--- a/generic/ttk/ttkNotebook.c
+++ b/generic/ttk/ttkNotebook.c
@@ -59,25 +59,25 @@ static const Tk_OptionSpec TabOptionSpecs[] =
{
{TK_OPTION_STRING_TABLE, "-state", "", "",
"normal", TCL_INDEX_NONE, offsetof(Tab,state),
- 0,(ClientData)TabStateStrings,0 },
+ 0, (void *)TabStateStrings, 0 },
{TK_OPTION_STRING, "-text", "text", "Text", "",
- offsetof(Tab,textObj), TCL_INDEX_NONE, 0,0,GEOMETRY_CHANGED },
+ offsetof(Tab,textObj), TCL_INDEX_NONE, 0, 0, GEOMETRY_CHANGED },
{TK_OPTION_STRING, "-image", "image", "Image", NULL/*default*/,
- offsetof(Tab,imageObj), TCL_INDEX_NONE, TK_OPTION_NULL_OK,0,GEOMETRY_CHANGED },
+ offsetof(Tab,imageObj), TCL_INDEX_NONE, TK_OPTION_NULL_OK, 0, GEOMETRY_CHANGED },
{TK_OPTION_STRING_TABLE, "-compound", "compound", "Compound",
NULL, offsetof(Tab,compoundObj), TCL_INDEX_NONE,
TK_OPTION_NULL_OK,(void *)ttkCompoundStrings,GEOMETRY_CHANGED },
{TK_OPTION_INT, "-underline", "underline", "Underline", "-1",
- offsetof(Tab,underlineObj), TCL_INDEX_NONE, 0,0,GEOMETRY_CHANGED },
+ offsetof(Tab,underlineObj), TCL_INDEX_NONE, 0, 0, GEOMETRY_CHANGED },
{TK_OPTION_END, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0 }
};
static const Tk_OptionSpec PaneOptionSpecs[] =
{
{TK_OPTION_STRING, "-padding", "padding", "Padding", "0",
- offsetof(Tab,paddingObj), TCL_INDEX_NONE, 0,0,GEOMETRY_CHANGED },
+ offsetof(Tab,paddingObj), TCL_INDEX_NONE, 0, 0, GEOMETRY_CHANGED },
{TK_OPTION_STRING, "-sticky", "sticky", "Sticky", "nsew",
- offsetof(Tab,stickyObj), TCL_INDEX_NONE, 0,0,GEOMETRY_CHANGED },
+ offsetof(Tab,stickyObj), TCL_INDEX_NONE, 0, 0, GEOMETRY_CHANGED },
WIDGET_INHERIT_OPTIONS(TabOptionSpecs)
};
@@ -1079,7 +1079,7 @@ static int NotebookIdentifyCommand(
return TCL_ERROR;
}
- if ( Tcl_GetIntFromObj(interp, objv[objc-2], &x) != TCL_OK
+ if (Tcl_GetIntFromObj(interp, objv[objc-2], &x) != TCL_OK
|| Tcl_GetIntFromObj(interp, objv[objc-1], &y) != TCL_OK
|| (objc == 5 && Tcl_GetIndexFromObjStruct(interp, objv[2], whatTable,
sizeof(char *), "option", 0, &what) != TCL_OK)
@@ -1108,9 +1108,8 @@ static int NotebookIdentifyCommand(
}
break;
case IDENTIFY_TAB:
- if (tabIndex != TCL_INDEX_NONE) {
- Tcl_SetObjResult(interp, Tcl_NewWideIntObj(tabIndex));
- }
+ if (tabIndex != TCL_INDEX_NONE)
+ Tcl_SetObjResult(interp, TkNewIndexObj(tabIndex));
break;
}
return TCL_OK;
@@ -1134,8 +1133,9 @@ static int NotebookIndexCommand(
}
status = FindTabIndex(interp, nb, objv[2], &index);
- if (status == TCL_OK && index != TCL_INDEX_NONE) {
- Tcl_SetObjResult(interp, Tcl_NewWideIntObj(index));
+ if (status == TCL_OK) {
+ if (index != TCL_INDEX_NONE)
+ Tcl_SetObjResult(interp, TkNewIndexObj(index));
}
return status;