diff --git a/uitable.h b/uitable.h index 645096bd..a9008369 100644 --- a/uitable.h +++ b/uitable.h @@ -29,7 +29,7 @@ typedef struct uiTableCellPart uiTableCellPart; _UI_EXTERN uiTableCellLayout *uiNewTableCellLayout(void); _UI_EXTERN void uiFreeTableCellLayout(uiTableCellLayout *c); -_UI_ExTERN void uiTableCellLayoutAppend(uiTableCellLayout *c, uiTableCellPart *part, int expand); +_UI_EXTERN void uiTableCellLayoutAppend(uiTableCellLayout *c, uiTableCellPart *part, int expand); _UI_EXTERN uiTableCellPart *uiNewTableTextPart(int modelColumn); _UI_EXTERN void uiFreeTableCellPart(uiTableCellPart *p); diff --git a/unix/progressbar.c b/unix/progressbar.c index 08b45f33..9b543b04 100644 --- a/unix/progressbar.c +++ b/unix/progressbar.c @@ -9,7 +9,18 @@ struct uiProgressBar { guint pulser; }; -uiUnixControlAllDefaults(uiProgressBar) +uiUnixControlAllDefaultsExceptDestroy(uiProgressBar) + +static void uiProgressBarDestroy(uiControl *c) +{ + uiProgressBar *p = uiProgressBar(c); + + // be sure to stop the timeout now + if (p->indeterminate) + g_source_remove(p->pulser); + g_object_unref(p->widget); + uiFreeControl(uiControl(p)); +} int uiProgressBarValue(uiProgressBar *p) {