diff options
author | A. Walton <awalton@gnome.org> | 2008-06-11 21:37:08 +0000 |
---|---|---|
committer | Andrew Walton <awalton@src.gnome.org> | 2008-06-11 21:37:08 +0000 |
commit | cd36e43b16fbf3e70823976eb9547d4634405ee9 (patch) | |
tree | 7e5898f4293450eec256518d7ded71ffb39c980e /libnautilus-private | |
parent | 1be2f583199fbd16c379af86e92492728cfde256 (diff) | |
download | nautilus-cd36e43b16fbf3e70823976eb9547d4634405ee9.tar.gz |
Never hide hidden or backup files in the trash. Fixes bug #153545.
2008-06-11 A. Walton <awalton@gnome.org>
* libnautilus-private/nautilus-file.c
(nautilus_file_should_show):
Never hide hidden or backup files in the trash. Fixes bug
#153545.
svn path=/trunk/; revision=14259
Diffstat (limited to 'libnautilus-private')
-rw-r--r-- | libnautilus-private/nautilus-file.c | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/libnautilus-private/nautilus-file.c b/libnautilus-private/nautilus-file.c index e957cfe1e..eef4b2cc1 100644 --- a/libnautilus-private/nautilus-file.c +++ b/libnautilus-private/nautilus-file.c @@ -2715,14 +2715,29 @@ is_file_hidden (NautilusFile *file) } +/** + * nautilus_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 #NautilusFile should be shown. Note that when browsing + * a trash directory, this function will always return %TRUE. + * + * Returns: %TRUE if the file should be shown, %FALSE if it shouldn't. + */ gboolean nautilus_file_should_show (NautilusFile *file, gboolean show_hidden, gboolean show_backup) { - return (show_hidden || (!nautilus_file_is_hidden_file (file) && !is_file_hidden (file))) && - (show_backup || !nautilus_file_is_backup_file (file)); - + /* Never hide any files in trash. */ + if (nautilus_file_is_in_trash (file)) { + return TRUE; + } else { + return (show_hidden || (!nautilus_file_is_hidden_file (file) && !is_file_hidden (file))) && + (show_backup || !nautilus_file_is_backup_file (file)); + } } gboolean |