diff options
author | Benjamin Otte <otte@redhat.com> | 2015-12-01 17:42:09 +0100 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2015-12-02 00:29:30 +0100 |
commit | 7a154d9acd7a4b496c12a925ddea1d24b8efffd9 (patch) | |
tree | d9bcc077c0e0d29eb7a20abd1a5d32f3a3ba26b0 /gtk/gtkentry.c | |
parent | 4a42aa5229e0ba80cf4673c67575ef57d60ae6c5 (diff) | |
download | gtk+-7a154d9acd7a4b496c12a925ddea1d24b8efffd9.tar.gz |
dnd: Add gtk_drag_set_icon_definition()
... and use it for entry icons.
As a side effect, icons dragged from entries will now resize to DND
size.
Diffstat (limited to 'gtk/gtkentry.c')
-rw-r--r-- | gtk/gtkentry.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c index ff608693c8..68704532e5 100644 --- a/gtk/gtkentry.c +++ b/gtk/gtkentry.c @@ -36,6 +36,7 @@ #include "gtkclipboard.h" #include "gtkdebug.h" #include "gtkdnd.h" +#include "gtkdndprivate.h" #include "gtkentry.h" #include "gtkentrybuffer.h" #include "gtkiconhelperprivate.h" @@ -10054,14 +10055,9 @@ gtk_entry_drag_begin (GtkWidget *widget, { if (icon_info->in_drag) { - GdkPixbuf *pix; - - pix = _gtk_icon_helper_ensure_pixbuf - (icon_info->icon_helper, - gtk_widget_get_style_context (GTK_WIDGET (entry))); - gtk_drag_set_icon_pixbuf (context, pix, -2, -2); - - g_object_unref (pix); + gtk_drag_set_icon_definition (context, + gtk_icon_helper_get_definition (icon_info->icon_helper), + -2, -2); return; } } |