summaryrefslogtreecommitdiff
path: root/libcaja-private/caja-file.c
diff options
context:
space:
mode:
Diffstat (limited to 'libcaja-private/caja-file.c')
-rw-r--r--libcaja-private/caja-file.c34
1 files changed, 7 insertions, 27 deletions
diff --git a/libcaja-private/caja-file.c b/libcaja-private/caja-file.c
index 839940fa..65bbaa38 100644
--- a/libcaja-private/caja-file.c
+++ b/libcaja-private/caja-file.c
@@ -99,7 +99,6 @@
typedef enum {
SHOW_HIDDEN = 1 << 0,
- SHOW_BACKUP = 1 << 1
} FilterOptions;
typedef void (* ModifyListFunction) (GList **list, CajaFile *file);
@@ -444,7 +443,6 @@ caja_file_clear_info (CajaFile *file)
file->details->is_trusted_link = FALSE;
file->details->is_symlink = FALSE;
file->details->is_hidden = FALSE;
- file->details->is_backup = FALSE;
file->details->is_mountpoint = FALSE;
file->details->uid = -1;
file->details->gid = -1;
@@ -2087,7 +2085,7 @@ update_info_internal (CajaFile *file,
{
GList *node;
gboolean changed;
- gboolean is_symlink, is_hidden, is_backup, is_mountpoint;
+ gboolean is_symlink, is_hidden, is_mountpoint;
gboolean has_permissions;
guint32 permissions;
gboolean can_read, can_write, can_execute, can_delete, can_trash, can_rename, can_mount, can_unmount, can_eject;
@@ -2177,18 +2175,12 @@ update_info_internal (CajaFile *file,
}
file->details->is_symlink = is_symlink;
- is_hidden = g_file_info_get_is_hidden (info);
+ is_hidden = g_file_info_get_is_hidden (info) || g_file_info_get_is_backup (info);
if (file->details->is_hidden != is_hidden) {
changed = TRUE;
}
file->details->is_hidden = is_hidden;
- is_backup = g_file_info_get_is_backup (info);
- if (file->details->is_backup != is_backup) {
- changed = TRUE;
- }
- file->details->is_backup = is_backup;
-
is_mountpoint = g_file_info_get_attribute_boolean (info, G_FILE_ATTRIBUTE_UNIX_IS_MOUNTPOINT);
if (file->details->is_mountpoint != is_mountpoint) {
changed = TRUE;
@@ -3397,12 +3389,6 @@ caja_file_is_hidden_file (CajaFile *file)
return file->details->is_hidden;
}
-gboolean
-caja_file_is_backup_file (CajaFile *file)
-{
- return file->details->is_backup;
-}
-
static gboolean
is_file_hidden (CajaFile *file)
{
@@ -3416,7 +3402,6 @@ is_file_hidden (CajaFile *file)
* caja_file_should_show:
* @file: the file to check.
* @show_hidden: whether we want to show hidden files or not.
- * @show_backup: whether we want to show backup files or not.
*
* Determines if a #CajaFile should be shown. Note that when browsing
* a trash directory, this function will always return %TRUE.
@@ -3426,7 +3411,6 @@ is_file_hidden (CajaFile *file)
gboolean
caja_file_should_show (CajaFile *file,
gboolean show_hidden,
- gboolean show_backup,
gboolean show_foreign)
{
/* Never hide any files in trash. */
@@ -3434,7 +3418,6 @@ caja_file_should_show (CajaFile *file,
return TRUE;
} else {
return (show_hidden || (!caja_file_is_hidden_file (file) && !is_file_hidden (file))) &&
- (show_backup || !caja_file_is_backup_file (file)) &&
(show_foreign || !(caja_file_is_in_desktop (file) && caja_file_is_foreign_link (file)));
}
}
@@ -3464,7 +3447,7 @@ caja_file_is_in_desktop (CajaFile *file)
}
static gboolean
-filter_hidden_and_backup_partition_callback (gpointer data,
+filter_hidden_partition_callback (gpointer data,
gpointer callback_data)
{
CajaFile *file;
@@ -3475,14 +3458,12 @@ filter_hidden_and_backup_partition_callback (gpointer data,
return caja_file_should_show (file,
options & SHOW_HIDDEN,
- options & SHOW_BACKUP,
TRUE);
}
GList *
-caja_file_list_filter_hidden_and_backup (GList *files,
- gboolean show_hidden,
- gboolean show_backup)
+caja_file_list_filter_hidden (GList *files,
+ gboolean show_hidden)
{
GList *filtered_files;
GList *removed_files;
@@ -3493,9 +3474,8 @@ caja_file_list_filter_hidden_and_backup (GList *files,
filtered_files = caja_file_list_copy (files);
filtered_files = eel_g_list_partition (filtered_files,
- filter_hidden_and_backup_partition_callback,
- GINT_TO_POINTER ((show_hidden ? SHOW_HIDDEN : 0) |
- (show_backup ? SHOW_BACKUP : 0)),
+ filter_hidden_partition_callback,
+ GINT_TO_POINTER ((show_hidden ? SHOW_HIDDEN : 0)),
&removed_files);
caja_file_list_free (removed_files);