[nautilus/wip/ernestask/attributes: 23/29] Clean up old cruft



commit 1e944e3e13a581522fbab4281c6f085bd1e1444b
Author: Ernestas Kulik <ernestask gnome org>
Date:   Tue Aug 8 16:01:58 2017 +0300

    Clean up old cruft

 src/nautilus-file.c              |   22 +---------------------
 src/nautilus-file.h              |   22 ++++++----------------
 src/nautilus-icon-names.h        |    3 ---
 src/nautilus-properties-window.c |    6 ++----
 4 files changed, 9 insertions(+), 44 deletions(-)
---
diff --git a/src/nautilus-file.c b/src/nautilus-file.c
index 2d668c1..969806d 100644
--- a/src/nautilus-file.c
+++ b/src/nautilus-file.c
@@ -5238,10 +5238,7 @@ nautilus_file_get_gicon (NautilusFile          *file,
     int i;
     gboolean is_folder = FALSE, is_inode_directory = FALSE;
 
-    if (file == NULL)
-    {
-        return NULL;
-    }
+    g_return_val_if_fail (NAUTILUS_IS_FILE (file), NULL);
 
     icon = get_custom_or_link_icon (file);
     if (icon != NULL)
@@ -5249,23 +5246,11 @@ nautilus_file_get_gicon (NautilusFile          *file,
         return icon;
     }
 
-    if (flags & NAUTILUS_FILE_ICON_FLAGS_USE_MOUNT_ICON)
-    {
-        icon = get_mount_icon (file);
-
-        if (icon != NULL)
-        {
-            goto out;
-        }
-    }
-
     if (file->details->icon)
     {
         icon = NULL;
 
         if (((flags & NAUTILUS_FILE_ICON_FLAGS_FOR_DRAG_ACCEPT) ||
-             (flags & NAUTILUS_FILE_ICON_FLAGS_FOR_OPEN_FOLDER) ||
-             (flags & NAUTILUS_FILE_ICON_FLAGS_USE_MOUNT_ICON) ||
              (flags & NAUTILUS_FILE_ICON_FLAGS_USE_EMBLEMS)) &&
             G_IS_THEMED_ICON (file->details->icon))
         {
@@ -5294,10 +5279,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 (is_folder &&
                 (flags & NAUTILUS_FILE_ICON_FLAGS_FOR_DRAG_ACCEPT))
             {
@@ -5321,7 +5302,6 @@ nautilus_file_get_gicon (NautilusFile          *file,
         }
     }
 
-out:
     if (icon == NULL)
     {
         icon = g_object_ref (get_default_file_icon ());
diff --git a/src/nautilus-file.h b/src/nautilus-file.h
index 3a83bd4..3b8385d 100644
--- a/src/nautilus-file.h
+++ b/src/nautilus-file.h
@@ -69,18 +69,14 @@ typedef enum {
 } NautilusRequestStatus;
 
 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_DRAG_ACCEPT = (1<<2),
-       NAUTILUS_FILE_ICON_FLAGS_FOR_OPEN_FOLDER = (1<<3),
+       NAUTILUS_FILE_ICON_FLAGS_NONE                 = 0,
+       NAUTILUS_FILE_ICON_FLAGS_USE_THUMBNAILS       = 1 << 0,
+       NAUTILUS_FILE_ICON_FLAGS_FOR_DRAG_ACCEPT      = 1 << 1,
        /* whether the thumbnail size must match the display icon size */
-       NAUTILUS_FILE_ICON_FLAGS_FORCE_THUMBNAIL_SIZE = (1<<4),
-       /* uses the icon of the mount if present */
-       NAUTILUS_FILE_ICON_FLAGS_USE_MOUNT_ICON = (1<<5),
+       NAUTILUS_FILE_ICON_FLAGS_FORCE_THUMBNAIL_SIZE = 1 << 2,
        /* render emblems */
-       NAUTILUS_FILE_ICON_FLAGS_USE_EMBLEMS = (1<<6),
-       NAUTILUS_FILE_ICON_FLAGS_USE_ONE_EMBLEM = (1<<7)
+       NAUTILUS_FILE_ICON_FLAGS_USE_EMBLEMS          = 1 << 3,
+       NAUTILUS_FILE_ICON_FLAGS_USE_ONE_EMBLEM       = 1 << 4
 } NautilusFileIconFlags;       
 
 /* Standard Drag & Drop types. */
@@ -120,12 +116,6 @@ typedef void (*NautilusFileOperationCallback) (NautilusFile  *file,
                                               GFile         *result_location,
                                               GError        *error,
                                               gpointer       callback_data);
-typedef int (*NautilusWidthMeasureCallback)   (const char    *string,
-                                              void          *context);
-typedef char * (*NautilusTruncateCallback)    (const char    *string,
-                                              int            width,
-                                              void          *context);
-
 
 #define NAUTILUS_FILE_ATTRIBUTES_FOR_ICON (NAUTILUS_FILE_ATTRIBUTE_INFO | NAUTILUS_FILE_ATTRIBUTE_LINK_INFO 
| NAUTILUS_FILE_ATTRIBUTE_THUMBNAIL)
 
diff --git a/src/nautilus-icon-names.h b/src/nautilus-icon-names.h
index 6457466..3bc617c 100644
--- a/src/nautilus-icon-names.h
+++ b/src/nautilus-icon-names.h
@@ -42,8 +42,5 @@
 /* Other icons */
 #define NAUTILUS_ICON_TEMPLATE         "text-x-generic-template"
 
-/* Icons not provided by fd.o naming spec or nautilus itself */
-#define NAUTILUS_ICON_BURN             "nautilus-cd-burner"
-
 #endif /* NAUTILUS_ICON_NAMES_H */
 
diff --git a/src/nautilus-properties-window.c b/src/nautilus-properties-window.c
index 40ad255..608a948 100644
--- a/src/nautilus-properties-window.c
+++ b/src/nautilus-properties-window.c
@@ -362,14 +362,12 @@ get_image_for_properties_window (NautilusPropertiesWindow  *window,
         if (!icon)
         {
             icon = nautilus_file_get_icon (file, NAUTILUS_CANVAS_ICON_SIZE_SMALL, 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_CANVAS_ICON_SIZE_SMALL, 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]