static gboolean gtkui_progress_shim(gpointer data) { struct gtkui_progress_data *gpd = data; gtkui_progress(gpd->title, gpd->value, gpd->max); free(gpd); return FALSE; }
static gboolean gtkui_progress_shim(gpointer data) { struct gtkui_progress_data *gpd = data; gdouble delay; gulong usec; delay = g_timer_elapsed(progress_timer, &usec); delay += usec / 1000000; /* render progress bar if not canceled or lasting longer than 750 ms */ if (!progress_canceled && delay >= 0.75) gtkui_progress(gpd->title, gpd->value, gpd->max); free(gpd->title); free(gpd); return FALSE; }