Stop uiProgressBar pulsing on destroy on GTK+. Fixes #163.

This commit is contained in:
Pietro Gagliardi 2016-06-21 12:39:53 -04:00
parent 10480db895
commit 2d4f6eb2b8
2 changed files with 13 additions and 2 deletions

View File

@ -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);

View File

@ -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)
{