colorpicker
colorpicker copied to clipboard
Fix GTK callback error
gtk_timeout_add expects its callback to match the type GtkFunction, which is:
typedef gboolean (*GtkFunction)(gpointer data);
But the function is declared as gint preview_rectangle_refresh(), which is an incompatible pointer type (int (*)(void) vs int (*)(void *)).
This is causing an error:
expected ‘GtkFunction’ {aka ‘int (*)(void *)’}
but argument is of type ‘gint (*)(void)’ {aka ‘int (*)(void)’}
This is fixed in this commit. Also, destroyed pixel to prevent leaks.