mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-24 13:06:14 +01:00
gio: do not add an icon name already in the list.
This may happen when creating an icon with several icon name whereas one is already a variant of a previous one.
This commit is contained in:
parent
9290044265
commit
5fb6d788a5
@ -156,6 +156,12 @@ g_themed_icon_constructed (GObject *object)
|
||||
gchar *name;
|
||||
gboolean is_symbolic;
|
||||
|
||||
if (g_list_find_custom (names, themed->names[i], (GCompareFunc) g_strcmp0) ||
|
||||
g_list_find_custom (variants, themed->names[i], (GCompareFunc) g_strcmp0))
|
||||
/* The icon name was already added and is higher in priority.
|
||||
* There is no need to re-add it. */
|
||||
continue;
|
||||
|
||||
is_symbolic = g_str_has_suffix (themed->names[i], "-symbolic");
|
||||
if (is_symbolic)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user