summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErnestas Kulik <ernestask@gnome.org>2017-08-08 16:01:58 +0300
committerErnestas Kulik <ernestask@gnome.org>2017-08-17 18:54:05 +0300
commit9d249a248815bdd64694ec8ba5cd8d3fd46fe683 (patch)
treee4a97b327ef119d9dc9df26d2c7df6b135b2312d
parent3f0596b3d7d5d56cc2e9e5594d08d53c70118857 (diff)
downloadnautilus-9d249a248815bdd64694ec8ba5cd8d3fd46fe683.tar.gz
Clean up old cruft
-rw-r--r--src/nautilus-file.c22
-rw-r--r--src/nautilus-file.h22
-rw-r--r--src/nautilus-icon-names.h3
-rw-r--r--src/nautilus-properties-window.c6
4 files changed, 9 insertions, 44 deletions
diff --git a/src/nautilus-file.c b/src/nautilus-file.c
index 8758958f0..6c3e9e067 100644
--- a/src/nautilus-file.c
+++ b/src/nautilus-file.c
@@ -5220,10 +5220,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)
@@ -5231,23 +5228,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))
{
@@ -5276,10 +5261,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))
{
@@ -5303,7 +5284,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 417977856..c32420451 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 64574662c..3bc617c5f 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 40ad2554d..608a94873 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);