diff options
author | inmarket <andrewh@inmarket.com.au> | 2014-05-01 16:45:55 +1000 |
---|---|---|
committer | inmarket <andrewh@inmarket.com.au> | 2014-05-01 16:45:55 +1000 |
commit | 763fd061ecd6c9bb4877b5b6f5a01ce363ef09a4 (patch) | |
tree | 8e56cb71a03ac7f1085764bb59aa1811db43b506 /src | |
parent | b37370bdb5e3f5ffa325619c78d31c9993e79745 (diff) | |
download | uGFX-763fd061ecd6c9bb4877b5b6f5a01ce363ef09a4.tar.gz uGFX-763fd061ecd6c9bb4877b5b6f5a01ce363ef09a4.tar.bz2 uGFX-763fd061ecd6c9bb4877b5b6f5a01ce363ef09a4.zip |
Fixed enable bug in progress bar
Diffstat (limited to 'src')
-rw-r--r-- | src/gwin/progressbar.c | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/src/gwin/progressbar.c b/src/gwin/progressbar.c index 7c34607f..c64e2119 100644 --- a/src/gwin/progressbar.c +++ b/src/gwin/progressbar.c @@ -43,7 +43,7 @@ static const gwidgetVMT progressbarVMT = { { "Progressbar", // The classname sizeof(GProgressbarObject), // The object size - _destroy, // The destroy routine + _destroy, // The destroy routine _gwidgetRedraw, // The redraw routine 0, // The after-clear routine }, @@ -180,7 +180,7 @@ void gwinProgressbarDecrement(GHandle gh) { } // used by gwinProgressbarStart(); -void _progressbarCallback(void *param) { +static void _progressbarCallback(void *param) { #define gsw ((GProgressbarObject *)gh) GHandle gh = (GHandle)param; @@ -206,11 +206,13 @@ void gwinProgressbarStart(GHandle gh, delaytime_t delay) { gtimerInit(&(gsw->gt)); gtimerStart(&(gsw->gt), _progressbarCallback, gh, FALSE, gsw->delay); - // if this is not made, the progressbar will not start when the it's already visible - if (gsw->w.g.flags & GWIN_FLG_VISIBLE) { - gwinSetVisible(gh, FALSE); - gwinSetVisible(gh, TRUE); - } + #if 0 + // if this is not made, the progressbar will not start when it's already visible + if (gsw->w.g.flags & GWIN_FLG_VISIBLE) { + gwinSetVisible(gh, FALSE); + gwinSetVisible(gh, TRUE); + } + #endif #undef gsw } @@ -239,13 +241,6 @@ void gwinProgressbarDraw_Std(GWidgetObject *gw, void *param) { if (gw->g.vmt != (gwinVMT *)&progressbarVMT) return; - // disable the auto-update timer if any - #if GFX_USE_GTIMER - if (gtimerIsActive(&(gsw->gt)) && !(gw->g.flags & GWIN_FLG_ENABLED)) { - gtimerStop(&(gsw->gt)); - } - #endif - // get the colors right if ((gw->g.flags & GWIN_FLG_ENABLED)) pcol = &gw->pstyle->pressed; |