icontheme: Adapt a code sample to the GdkPaintable transition
authorTimm Bäder <mail@baedert.org>
Mon, 2 Sep 2019 07:35:37 +0000 (09:35 +0200)
committerTimm Bäder <mail@baedert.org>
Mon, 9 Sep 2019 15:36:27 +0000 (17:36 +0200)
gtk/gtkicontheme.c

index d8be809a60d9cac2a8722871e82395a3ecf1d969..cee105f9c2c835f220521f146a67d00837cd9894 100644 (file)
  * |[<!-- language="C" -->
  * GError *error = NULL;
  * GtkIconTheme *icon_theme;
- * GdkPixbuf *pixbuf;
+ * GdkPaintable *paintable;
  *
  * icon_theme = gtk_icon_theme_get_default ();
- * pixbuf = gtk_icon_theme_load_icon (icon_theme,
- *                                    "my-icon-name", // icon name
- *                                    48, // icon size
- *                                    0,  // flags
- *                                    &error);
- * if (!pixbuf)
+ * paintable = gtk_icon_theme_load_icon (icon_theme,
+ *                                       "my-icon-name", // icon name
+ *                                       48, // icon size
+ *                                       0,  // flags
+ *                                       &error);
+ * if (!paintable)
  *   {
  *     g_warning ("Couldn’t load icon: %s", error->message);
  *     g_error_free (error);
  *   }
  * else
  *   {
- *     // Use the pixbuf
- *     g_object_unref (pixbuf);
+ *     // Use the icon
+ *     g_object_unref (paintable);
  *   }
  * ]|
  */