Commit 4637f974 authored by Ernestas Kulik's avatar Ernestas Kulik 🦑

Clean up old cruft

parent c56fa101
......@@ -5237,10 +5237,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)
......@@ -5248,23 +5245,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))
{
......@@ -5293,10 +5278,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))
{
......@@ -5320,7 +5301,6 @@ nautilus_file_get_gicon (NautilusFile *file,
}
}
out:
if (icon == NULL)
{
icon = g_object_ref (get_default_file_icon ());
......
......@@ -70,18 +70,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. */
......
......@@ -361,14 +361,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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment