mirror of
https://gitlab.gnome.org/GNOME/nautilus
synced 2024-06-30 23:46:35 +00:00
file: Don't rely on application-x-generic
`application-x-generic` is our preferred fallback themed icon. However, it's not present in the icon naming specification[0] and, as such, is not included in the icon themes some downstreams adopt. Instead of immediately resorting to the unthemed fallback texture, we can give a second themed alternative which is likely available in any icon theme: text-x-generic. [0] https://specifications.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html Fixes https://gitlab.gnome.org/GNOME/nautilus/-/issues/3268
This commit is contained in:
parent
56a9882610
commit
a9ca62f771
|
@ -4398,7 +4398,8 @@ get_default_file_icon (void)
|
|||
static GIcon *fallback_icon = NULL;
|
||||
if (fallback_icon == NULL)
|
||||
{
|
||||
fallback_icon = g_themed_icon_new ("application-x-generic");
|
||||
fallback_icon = g_themed_icon_new_from_names ((char *[]){"application-x-generic",
|
||||
"text-x-generic"}, 2);
|
||||
}
|
||||
|
||||
return fallback_icon;
|
||||
|
|
|
@ -545,7 +545,8 @@ get_image_for_properties_window (NautilusPropertiesWindow *self,
|
|||
|
||||
if (!icon)
|
||||
{
|
||||
g_autoptr (GIcon) gicon = g_themed_icon_new ("application-x-generic");
|
||||
g_autoptr (GIcon) gicon = g_themed_icon_new_from_names ((char *[]){"application-x-generic",
|
||||
"text-x-generic"}, 2);
|
||||
|
||||
icon = nautilus_icon_info_lookup (gicon, NAUTILUS_GRID_ICON_SIZE_MEDIUM, icon_scale);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user