summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntónio Fernandes <antoniof@gnome.org>2020-04-10 22:42:55 +0100
committerOndrej Holy <oholy@redhat.com>2020-09-14 08:07:48 +0200
commitca6d56fef057da940704a598100e804cfd74e00d (patch)
tree419912931695ad0d2d3c8f4082cf36b7af3136da
parent1de9f8ef3d1e288d8a8be316f0534b36c631527b (diff)
downloadnautilus-ca6d56fef057da940704a598100e804cfd74e00d.tar.gz
Revert "file: use emblems for files that use default icon"
This reverts commit 8efe35665368539de0e15f150292996cb0ab9121. It aggravated a performance bug. Reverting only on stable branches. https://gitlab.gnome.org/GNOME/nautilus/-/issues/1226
-rw-r--r--src/nautilus-file.c23
1 files changed, 1 insertions, 22 deletions
diff --git a/src/nautilus-file.c b/src/nautilus-file.c
index ff902db12..6fcaea89b 100644
--- a/src/nautilus-file.c
+++ b/src/nautilus-file.c
@@ -5330,31 +5330,10 @@ nautilus_file_get_icon (NautilusFile *file,
icon = nautilus_icon_info_lookup (gicon, size, scale);
g_object_unref (gicon);
- /* Files for which the MIME type cannot be determined will result in
- * the icon being detected as a fallback. This is because the default
- * theme does not have icons for the names corresponding to these file
- * types. */
if (nautilus_icon_info_is_fallback (icon))
{
g_object_unref (icon);
-
- gicon = get_default_file_icon ();
-
- /* Increase ref count on gicon, even though it is statically
- * allocated. This is needed because apply_emblems_to_icon
- * decreases the ref count on the original icon it is given. */
- g_object_ref (gicon);
-
- if (flags & NAUTILUS_FILE_ICON_FLAGS_USE_EMBLEMS)
- {
- apply_emblems_to_icon (file, &gicon, flags);
- }
-
- icon = nautilus_icon_info_lookup (gicon, size, scale);
-
- /* Decrease ref count on either the static default icon, or on the
- * newly-created emblemed icon. */
- g_object_unref (gicon);
+ icon = nautilus_icon_info_lookup (get_default_file_icon (), size, scale);
}
}