diff options
author | Emmanuele Bassi <ebassi@gnome.org> | 2020-02-11 17:24:01 +0000 |
---|---|---|
committer | Emmanuele Bassi <ebassi@gnome.org> | 2020-02-13 14:53:25 +0000 |
commit | cdd7e4c5ec8f44d80c886a071984eaf85b5eed69 (patch) | |
tree | d2dc510fd7d00f5c8a4a046d717316458c9c1064 /gtk/gtkcolorswatch.c | |
parent | 47f2a6cafd1b2353a3414147ec083e84e9d95885 (diff) | |
download | gtk+-cdd7e4c5ec8f44d80c886a071984eaf85b5eed69.tar.gz |
Add a notify function to GdkContentProvider
The callback-based content providers need a GDestroyNotify function to
free the data passed to them on construction, otherwise they are going
to leak.
Diffstat (limited to 'gtk/gtkcolorswatch.c')
-rw-r--r-- | gtk/gtkcolorswatch.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/gtk/gtkcolorswatch.c b/gtk/gtkcolorswatch.c index 270556ed78..e66caa63e3 100644 --- a/gtk/gtkcolorswatch.c +++ b/gtk/gtkcolorswatch.c @@ -598,7 +598,7 @@ gtk_color_swatch_set_rgba (GtkColorSwatch *swatch, GtkDragSource *source; source = gtk_drag_source_new (); - content = gdk_content_provider_new_with_callback (GDK_TYPE_RGBA, get_rgba_value, swatch); + content = gdk_content_provider_new_with_callback (GDK_TYPE_RGBA, get_rgba_value, swatch, NULL); gtk_drag_source_set_content (source, content); g_object_unref (content); g_signal_connect (source, "drag-begin", G_CALLBACK (gtk_color_swatch_drag_begin), swatch); @@ -618,7 +618,6 @@ gtk_color_swatch_set_rgba (GtkColorSwatch *swatch, { gtk_widget_add_css_class (GTK_WIDGET (swatch), "dark"); gtk_widget_remove_css_class (GTK_WIDGET (swatch), "light"); - } gtk_widget_queue_draw (GTK_WIDGET (swatch)); |