aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJoel Bodenmann <joel@unormal.org>2014-04-23 23:55:35 +0200
committerJoel Bodenmann <joel@unormal.org>2014-04-23 23:55:35 +0200
commitc3b17604ee456a725328f924a8a3ec339629eb7b (patch)
tree499535b0a9e3520e71ac4d3026f192b52e0e99a1 /src
parentadff1a0c030027c4eaac3dbe9a411dd33576058f (diff)
downloaduGFX-c3b17604ee456a725328f924a8a3ec339629eb7b.tar.gz
uGFX-c3b17604ee456a725328f924a8a3ec339629eb7b.tar.bz2
uGFX-c3b17604ee456a725328f924a8a3ec339629eb7b.zip
Fixing gwin progressbar destroying process
Diffstat (limited to 'src')
-rw-r--r--src/gwin/progressbar.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/gwin/progressbar.c b/src/gwin/progressbar.c
index 671c0971..a7acc0ed 100644
--- a/src/gwin/progressbar.c
+++ b/src/gwin/progressbar.c
@@ -29,12 +29,21 @@ static void ResetDisplayPos(GProgressbarObject *gsw) {
gsw->dpos = ((gsw->w.g.width-1)*(gsw->pos-gsw->min))/(gsw->max-gsw->min);
}
+// We have to deinitialize the timer which auto updates the progressbar if any
+static void _destroy(GHandle gh) {
+ #if GFX_USE_GTIMER
+ gtimerDeinit( &((GProgressbarObject *)gh)->gt );
+ #endif
+
+ _gwidgetDestroy(gh);
+}
+
// The progressbar VMT table
static const gwidgetVMT progressbarVMT = {
{
"Progressbar", // The classname
sizeof(GProgressbarObject), // The object size
- _gwidgetDestroy, // The destroy routine
+ _destroy, // The destroy routine
_gwidgetRedraw, // The redraw routine
0, // The after-clear routine
},