summaryrefslogtreecommitdiff
path: root/src/nautilus-file.c
diff options
context:
space:
mode:
authorAntónio Fernandes <antoniof@gnome.org>2022-08-08 00:28:28 +0100
committerAntónio Fernandes <antoniof@gnome.org>2022-09-01 12:23:06 +0100
commitf236675f0fbd2e749cb332a04435ab38839eda66 (patch)
tree7474d79257beb3384dcfbd688d739ab37078239a /src/nautilus-file.c
parentee0500c035e71f4d83b0c5ec70c6256ff0dda981 (diff)
downloadnautilus-f236675f0fbd2e749cb332a04435ab38839eda66.tar.gz
file: Drop "spacial file manager" leftovers
These flags were relevant when each folder opened in its own window, such that the open folders would have a different icon. Also, we would ignore that icon in properties. Spacial nautilus has been gone for maybe 15 years now.
Diffstat (limited to 'src/nautilus-file.c')
-rw-r--r--src/nautilus-file.c64
1 files changed, 1 insertions, 63 deletions
diff --git a/src/nautilus-file.c b/src/nautilus-file.c
index 3f0f489d8..6b4b2319a 100644
--- a/src/nautilus-file.c
+++ b/src/nautilus-file.c
@@ -5038,23 +5038,11 @@ nautilus_file_get_emblem_icons (NautilusFile *file)
return icons;
}
-static void
-prepend_icon_name (const char *name,
- GThemedIcon *icon)
-{
- g_themed_icon_prepend_name (icon, name);
-}
-
GIcon *
nautilus_file_get_gicon (NautilusFile *file,
NautilusFileIconFlags flags)
{
- const char * const *names;
- const char *name;
- GPtrArray *prepend_array;
GIcon *icon;
- int i;
- gboolean is_folder = FALSE, is_inode_directory = FALSE;
if (file == NULL)
{
@@ -5079,57 +5067,7 @@ nautilus_file_get_gicon (NautilusFile *file,
if (file->details->icon)
{
- icon = NULL;
-
- if (((flags & NAUTILUS_FILE_ICON_FLAGS_FOR_OPEN_FOLDER) ||
- (flags & NAUTILUS_FILE_ICON_FLAGS_USE_MOUNT_ICON)) &&
- G_IS_THEMED_ICON (file->details->icon))
- {
- names = g_themed_icon_get_names (G_THEMED_ICON (file->details->icon));
- prepend_array = g_ptr_array_new ();
-
- for (i = 0; names[i] != NULL; i++)
- {
- name = names[i];
-
- if (strcmp (name, "folder") == 0)
- {
- is_folder = TRUE;
- }
- if (strcmp (name, "inode-directory") == 0)
- {
- is_inode_directory = TRUE;
- }
- }
-
- /* Here, we add icons in reverse order of precedence,
- * because they are later prepended */
-
- /* "folder" should override "inode-directory", not the other way around */
- if (is_inode_directory)
- {
- g_ptr_array_add (prepend_array, "folder");
- }
- if (is_folder && (flags & NAUTILUS_FILE_ICON_FLAGS_FOR_OPEN_FOLDER))
- {
- g_ptr_array_add (prepend_array, "folder-open");
- }
-
- if (prepend_array->len)
- {
- /* When constructing GThemed Icon, pointers from the array
- * are reused, but not the array itself, so the cast is safe */
- icon = g_themed_icon_new_from_names ((char **) names, -1);
- g_ptr_array_foreach (prepend_array, (GFunc) prepend_icon_name, icon);
- }
-
- g_ptr_array_free (prepend_array, TRUE);
- }
-
- if (icon == NULL)
- {
- icon = g_object_ref (file->details->icon);
- }
+ icon = g_object_ref (file->details->icon);
}
out: