Deprecate GEmblemedIcon and GEmblem

Reasons for deprecating them:
 - Not many consumers
 - GTK4 dropped support for it
 - It's easy enough to implement the same feature without this special GIcon
 - Any place that accepts a GIcon is supposed to also support GEmblemedIcon
   e.g GNotification::set_icon(), but none of the backends supports it.

See the attached issue for more details.

Closes: https://gitlab.gnome.org/GNOME/glib/-/issues/3544
This commit is contained in:
Julian Sparber
2024-12-05 15:47:12 +01:00
parent b6da230b8f
commit 3d31d99c45
7 changed files with 67 additions and 16 deletions

View File

@@ -61,7 +61,7 @@
*
* If you want to consume `GIcon` (for example, in a toolkit) you must
* be prepared to handle at least the three following cases:
* [iface@Gio.LoadableIcon], [class@Gio.ThemedIcon] and [class@Gio.EmblemedIcon].
* [iface@Gio.LoadableIcon], [class@Gio.ThemedIcon] and [class@Gio.EmblemedIcon] (deprecated since 2.84).
* It may also make sense to have fast-paths for other cases (like handling
* [`GdkPixbuf`](https://docs.gtk.org/gdk-pixbuf/class.Pixbuf.html) directly,
* for example) but all compliant `GIcon` implementations outside of GIO must
@@ -471,6 +471,7 @@ g_icon_new_for_string (const gchar *str,
return icon;
}
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
static GEmblem *
g_icon_deserialize_emblem (GVariant *value)
{
@@ -555,6 +556,7 @@ g_icon_deserialize_emblemed (GVariant *value)
return icon;
}
G_GNUC_END_IGNORE_DEPRECATIONS
/**
* g_icon_deserialize: