[gtk/dnd-gestures-2: 242/242] gtk-demo: Update the ::prepare handler
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/dnd-gestures-2: 242/242] gtk-demo: Update the ::prepare handler
- Date: Tue, 7 Jan 2020 20:03:44 +0000 (UTC)
commit 280b5e199448d3331ee69c78776a41f57a330c60
Author: Matthias Clasen <mclasen redhat com>
Date: Tue Jan 7 14:48:09 2020 -0500
gtk-demo: Update the ::prepare handler
demos/gtk-demo/clipboard.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
---
diff --git a/demos/gtk-demo/clipboard.c b/demos/gtk-demo/clipboard.c
index 578bc6d7bf..5cad0626de 100644
--- a/demos/gtk-demo/clipboard.c
+++ b/demos/gtk-demo/clipboard.c
@@ -143,17 +143,13 @@ get_texture (GValue *value,
g_value_set_object (value, paintable);
}
-static void
+static GdkContentProvider *
prepare_drag (GtkDragSource *source,
double x,
double y,
GtkWidget *image)
{
- GdkContentProvider *content;
-
- content = gdk_content_provider_new_with_callback (GDK_TYPE_TEXTURE, get_texture, image);
- gtk_drag_source_set_content (source, content);
- g_object_unref (content);
+ return gdk_content_provider_new_with_callback (GDK_TYPE_TEXTURE, get_texture, image);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]