[gtk+] icon-browser: Stop using gtk_drag_source_set_icon_pixbuf
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] icon-browser: Stop using gtk_drag_source_set_icon_pixbuf
- Date: Thu, 30 Nov 2017 01:03:30 +0000 (UTC)
commit c0d6fd4f862adf6c8e883b47a8c7919f6089e80c
Author: Matthias Clasen <mclasen redhat com>
Date: Wed Nov 29 20:01:32 2017 -0500
icon-browser: Stop using gtk_drag_source_set_icon_pixbuf
We can just use gtk_drag_source_set_icon_name.
demos/icon-browser/iconbrowserwin.c | 6 +-----
gtk/gtkwidget.c | 2 +-
2 files changed, 2 insertions(+), 6 deletions(-)
---
diff --git a/demos/icon-browser/iconbrowserwin.c b/demos/icon-browser/iconbrowserwin.c
index 7034f23..1ce4524 100644
--- a/demos/icon-browser/iconbrowserwin.c
+++ b/demos/icon-browser/iconbrowserwin.c
@@ -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
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index 8a97c19..68b6d15 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]