diff options
Diffstat (limited to 'generic/ttk/ttkProgress.c')
-rw-r--r-- | generic/ttk/ttkProgress.c | 35 |
1 files changed, 19 insertions, 16 deletions
diff --git a/generic/ttk/ttkProgress.c b/generic/ttk/ttkProgress.c index 6e5875e..97109dc 100644 --- a/generic/ttk/ttkProgress.c +++ b/generic/ttk/ttkProgress.c @@ -71,10 +71,10 @@ static const Tk_OptionSpec ProgressbarOptionSpecs[] = {TK_OPTION_STRING_TABLE, "-mode", "mode", "ProgressMode", "determinate", offsetof(Progressbar,progress.modeObj), offsetof(Progressbar,progress.mode), - 0, (ClientData)ProgressbarModeStrings, 0 }, + 0, (void *)ProgressbarModeStrings, 0 }, {TK_OPTION_STRING_TABLE, "-orient", "orient", "Orient", "horizontal", offsetof(Progressbar,progress.orientObj), TCL_INDEX_NONE, - 0, (ClientData)ttkOrientStrings, STYLE_CHANGED }, + 0, (void *)ttkOrientStrings, STYLE_CHANGED }, {TK_OPTION_INT, "-phase", "phase", "Phase", "0", offsetof(Progressbar,progress.phaseObj), TCL_INDEX_NONE, 0, 0, 0 }, @@ -137,7 +137,7 @@ static void AnimateProgressProc(ClientData clientData) if (pb->progress.maxPhase) phase %= pb->progress.maxPhase; Tcl_DecrRefCount(pb->progress.phaseObj); - pb->progress.phaseObj = Tcl_NewIntObj(phase); + pb->progress.phaseObj = Tcl_NewWideIntObj(phase); Tcl_IncrRefCount(pb->progress.phaseObj); /* @@ -208,10 +208,11 @@ static void VariableChanged(void *recordPtr, const char *value) * +++ Widget class methods: */ -static void ProgressbarInitialize(Tcl_Interp *dummy, void *recordPtr) +static void ProgressbarInitialize( + TCL_UNUSED(Tcl_Interp *), + void *recordPtr) { Progressbar *pb = (Progressbar *)recordPtr; - (void)dummy; pb->progress.variableTrace = 0; pb->progress.timer = 0; @@ -259,12 +260,12 @@ static int ProgressbarConfigure(Tcl_Interp *interp, void *recordPtr, int mask) * Post-configuration hook: */ static int ProgressbarPostConfigure( - Tcl_Interp *dummy, void *recordPtr, int mask) + TCL_UNUSED(Tcl_Interp *), + void *recordPtr, + TCL_UNUSED(int)) { Progressbar *pb = (Progressbar *)recordPtr; int status = TCL_OK; - (void)dummy; - (void)mask; if (pb->progress.variableTrace) { status = Ttk_FireTrace(pb->progress.variableTrace); @@ -497,21 +498,23 @@ static int ProgressbarStartStopCommand( } static int ProgressbarStartCommand( - void *recordPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) + TCL_UNUSED(void *), + Tcl_Interp *interp, + int objc, + Tcl_Obj *const objv[]) { - (void)recordPtr; - return ProgressbarStartStopCommand( - interp, "::ttk::progressbar::start", objc, objv); + interp, "::ttk::progressbar::start", objc, objv); } static int ProgressbarStopCommand( - void *recordPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) + TCL_UNUSED(void *), + Tcl_Interp *interp, + int objc, + Tcl_Obj *const objv[]) { - (void)recordPtr; - return ProgressbarStartStopCommand( - interp, "::ttk::progressbar::stop", objc, objv); + interp, "::ttk::progressbar::stop", objc, objv); } static const Ttk_Ensemble ProgressbarCommands[] = { |