icon-browser: Stop using gtk_drag_source_set_icon_pixbuf

We can just use gtk_drag_source_set_icon_name.
This commit is contained in:
Matthias Clasen 2017-11-29 20:01:32 -05:00
parent 2ac0df0b75
commit c0d6fd4f86
2 changed files with 2 additions and 6 deletions

View File

@ -94,13 +94,9 @@ get_icon (GtkWidget *image, const gchar *name, gint size)
static void
set_image (GtkWidget *image, const gchar *name, gint size)
{
GdkPixbuf *pixbuf;
gtk_image_set_from_icon_name (GTK_IMAGE (image), name);
gtk_image_set_pixel_size (GTK_IMAGE (image), size);
pixbuf = get_icon (image, name, size);
gtk_drag_source_set_icon_pixbuf (image, pixbuf);
g_object_unref (pixbuf);
gtk_drag_source_set_icon_name (image, name);
}
static void

View File

@ -2623,7 +2623,7 @@ gtk_widget_class_init (GtkWidgetClass *klass)
*
* The ::drag-begin signal is emitted on the drag source when a drag is
* started. A typical reason to connect to this signal is to set up a
* custom drag icon with e.g. gtk_drag_source_set_icon_pixbuf().
* custom drag icon with e.g. gtk_drag_source_set_icon_surface().
*
* Note that some widgets set up a drag icon in the default handler of
* this signal, so you may have to use g_signal_connect_after() to