Make `gtk_icon_theme_has_icon` and `gtk_icon_theme_has_gicon` also
consider unthemed icons. This makes their behavior consistent with the
actual (documented) lookup behavior.
Fixes: #5709 and makes the workaround in nautilus@b643a00b obsolete
ensure_valid_themes (self, FALSE);
- if (gtk_string_set_lookup (&self->icons, icon_name) != NULL)
+ if (gtk_string_set_lookup (&self->icons, icon_name) != NULL ||
+ g_hash_table_contains (self->unthemed_icons, icon_name))
{
res = TRUE;
goto out;
for (int i = 0; names[i]; i++)
{
- if (gtk_string_set_lookup (&self->icons, names[i]) != NULL)
+ if (gtk_string_set_lookup (&self->icons, names[i]) != NULL ||
+ g_hash_table_contains (self->unthemed_icons, names[i]))
{
res = TRUE;
goto out;