nautilus r14259 - in trunk: . libnautilus-private
- From: awalton svn gnome org
- To: svn-commits-list gnome org
- Subject: nautilus r14259 - in trunk: . libnautilus-private
- Date: Wed, 11 Jun 2008 21:37:09 +0000 (UTC)
Author: awalton
Date: Wed Jun 11 21:37:08 2008
New Revision: 14259
URL: http://svn.gnome.org/viewvc/nautilus?rev=14259&view=rev
Log:
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.
Modified:
trunk/ChangeLog
trunk/libnautilus-private/nautilus-file.c
Modified: trunk/libnautilus-private/nautilus-file.c
==============================================================================
--- trunk/libnautilus-private/nautilus-file.c (original)
+++ trunk/libnautilus-private/nautilus-file.c Wed Jun 11 21:37:08 2008
@@ -2715,14 +2715,29 @@
}
+/**
+ * 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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]