[nautilus/wip/antoniof/hidpi-and-icons-cleanup: 32/32] file: Drop "spacial file manager" leftovers




commit 289fdeef79ec583d18cf0a31e81095b82e835b80
Author: António Fernandes <antoniof gnome org>
Date:   Mon Aug 8 00:28:28 2022 +0100

    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.

 src/nautilus-file.c              | 13 ++-----------
 src/nautilus-file.h              |  4 +---
 src/nautilus-properties-window.c |  6 ++----
 3 files changed, 5 insertions(+), 18 deletions(-)
---
diff --git a/src/nautilus-file.c b/src/nautilus-file.c
index 62980f6c4..b6b3fdfe5 100644
--- a/src/nautilus-file.c
+++ b/src/nautilus-file.c
@@ -5043,7 +5043,7 @@ nautilus_file_get_gicon (NautilusFile          *file,
     GPtrArray *prepend_array;
     GIcon *icon;
     int i;
-    gboolean is_folder = FALSE, is_inode_directory = FALSE;
+    gboolean is_inode_directory = FALSE;
 
     if (file == NULL)
     {
@@ -5070,8 +5070,7 @@ nautilus_file_get_gicon (NautilusFile          *file,
     {
         icon = NULL;
 
-        if (((flags & NAUTILUS_FILE_ICON_FLAGS_FOR_OPEN_FOLDER) ||
-             (flags & NAUTILUS_FILE_ICON_FLAGS_USE_MOUNT_ICON)) &&
+        if ((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));
@@ -5081,10 +5080,6 @@ nautilus_file_get_gicon (NautilusFile          *file,
             {
                 name = names[i];
 
-                if (strcmp (name, "folder") == 0)
-                {
-                    is_folder = TRUE;
-                }
                 if (strcmp (name, "inode-directory") == 0)
                 {
                     is_inode_directory = TRUE;
@@ -5099,10 +5094,6 @@ nautilus_file_get_gicon (NautilusFile          *file,
             {
                 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)
             {
diff --git a/src/nautilus-file.h b/src/nautilus-file.h
index 68c7ff931..0ad5b75f5 100644
--- a/src/nautilus-file.h
+++ b/src/nautilus-file.h
@@ -80,10 +80,8 @@ typedef enum {
 typedef enum {
        NAUTILUS_FILE_ICON_FLAGS_NONE = 0,
        NAUTILUS_FILE_ICON_FLAGS_USE_THUMBNAILS = (1<<0),
-       NAUTILUS_FILE_ICON_FLAGS_IGNORE_VISITING = (1<<1),
-       NAUTILUS_FILE_ICON_FLAGS_FOR_OPEN_FOLDER = (1<<2),
        /* uses the icon of the mount if present */
-       NAUTILUS_FILE_ICON_FLAGS_USE_MOUNT_ICON = (1<<3),
+       NAUTILUS_FILE_ICON_FLAGS_USE_MOUNT_ICON = (1<<1),
 } NautilusFileIconFlags;       
 
 #define NAUTILUS_THUMBNAIL_MINIMUM_ICON_SIZE 32
diff --git a/src/nautilus-properties-window.c b/src/nautilus-properties-window.c
index af8c2d8bb..7b2ac95dc 100644
--- a/src/nautilus-properties-window.c
+++ b/src/nautilus-properties-window.c
@@ -576,14 +576,12 @@ get_image_for_properties_window (NautilusPropertiesWindow  *self,
         if (!icon)
         {
             icon = nautilus_file_get_icon (file, NAUTILUS_GRID_ICON_SIZE_MEDIUM, icon_scale,
-                                           NAUTILUS_FILE_ICON_FLAGS_USE_THUMBNAILS |
-                                           NAUTILUS_FILE_ICON_FLAGS_IGNORE_VISITING);
+                                           NAUTILUS_FILE_ICON_FLAGS_USE_THUMBNAILS);
         }
         else
         {
             new_icon = nautilus_file_get_icon (file, NAUTILUS_GRID_ICON_SIZE_MEDIUM, icon_scale,
-                                               NAUTILUS_FILE_ICON_FLAGS_USE_THUMBNAILS |
-                                               NAUTILUS_FILE_ICON_FLAGS_IGNORE_VISITING);
+                                               NAUTILUS_FILE_ICON_FLAGS_USE_THUMBNAILS);
             if (!new_icon || new_icon != icon)
             {
                 g_object_unref (icon);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]