--- old-nautilus/src/file-manager/fm-properties-window.c	2006-12-27 20:29:13.000000000 +0000
+++ new-nautilus/src/file-manager/fm-properties-window.c	2006-12-27 20:29:13.000000000 +0000
@@ -2553,15 +2556,36 @@
 }
 
 static gboolean
+contains_only_virtual_folders (FMPropertiesWindow *window)
+{
+	GList *l;
+	for (l = window->details->original_files;l!=NULL;l = l->next) {
+		NautilusFile *file;
+		file = NAUTILUS_FILE (l->data);
+		if (NAUTILUS_IS_DESKTOP_ICON_FILE (file)) {
+			NautilusDesktopLink *link;
+			NautilusDesktopLinkType type;
+			link = nautilus_desktop_icon_file_get_link (NAUTILUS_DESKTOP_ICON_FILE (file));
+			type = nautilus_desktop_link_get_link_type(link);
+			if (type == NAUTILUS_DESKTOP_LINK_VOLUME || type==NAUTILUS_DESKTOP_LINK_HOME)
+				return FALSE;
+		}
+		else {
+			return FALSE;
+		}
+	}
+	return TRUE;
+}
+
+static gboolean
 should_show_custom_icon_buttons (FMPropertiesWindow *window) 
 {
 	/* FIXME bugzilla.gnome.org 45642:
-	 * Custom icons aren't displayed on the the desktop Trash icon, so
+	 * Custom icons aren't displayed on desktop link icons, so
 	 * we shouldn't pretend that they work by showing them here.
 	 * When bug 5642 is fixed we can remove this case.
 	 */
-	if (!is_multi_file_window (window) 
-	    && is_merged_trash_directory (get_target_file (window))) {
+	if (contains_only_virtual_folders(window)) {
 		return FALSE;
 	}
 
@@ -2571,9 +2595,8 @@
 static gboolean
 should_show_file_type (FMPropertiesWindow *window) 
 {
-	/* The trash on the desktop is one-of-a-kind */
-	if (!is_multi_file_window (window) 
-	    && is_merged_trash_directory (get_target_file (window))) {
+	/* Virtual folders are one-of-a-kind */
+	if (contains_only_virtual_folders(window)) {
 		return FALSE;
 	}
 
@@ -2591,6 +2614,9 @@
 	if (file_list_all_directories (window->details->target_files)) {
 		return FALSE;
 	}
+	if (contains_only_virtual_folders(window)) {
+		return FALSE;
+	}
 
 	return TRUE;
 }
@@ -2601,6 +2627,9 @@
 	if (file_list_all_directories (window->details->target_files)) {
 		return FALSE;
 	}
+	if (contains_only_virtual_folders(window)) {
+		return FALSE;
+	}
 
 	return TRUE;
 }
@@ -2619,6 +2648,9 @@
 static gboolean
 should_show_free_space (FMPropertiesWindow *window)
 {
+	if (contains_only_virtual_folders(window)) {
+		return FALSE;
+	}
 	if (file_list_all_local (window->details->target_files)
 	    && file_list_all_directories (window->details->target_files)) {
 		return TRUE;
@@ -2696,7 +2728,7 @@
 	if (is_multi_file_window (window) ||
 	    nautilus_file_is_directory (get_target_file (window))) {
 		append_directory_contents_fields (window, table);
-	} else {
+	} else if (!contains_only_virtual_folders(window)) {
 		append_title_value_pair (window, table, _("Size:"), 
 					 "size_detail",
 					 _("--"),
@@ -2737,10 +2769,12 @@
 	/* Blank title ensures standard row height */
 	append_title_field (table, "", NULL);
 	
-	append_title_value_pair (window, table, _("Modified:"), 
-				 "date_modified",
-				 _("--"),
-				 FALSE);
+	if (!contains_only_virtual_folders(window)) {
+		append_title_value_pair (window, table, _("Modified:"), 
+					 "date_modified",
+					 _("--"),
+					 FALSE);
+	}
 	
 	if (should_show_accessed_date (window)) {
 		append_title_value_pair (window, table, _("Accessed:"), 
@@ -4303,11 +4337,9 @@
 static gboolean
 should_show_permissions (FMPropertiesWindow *window) 
 {
-	/* Don't show permissions for the Trash since it's not
-	 * really a file system object.
+	/* Don't show permissions for virtual folders
 	 */
-	if (!is_multi_file_window (window)
-	    && is_merged_trash_directory (get_target_file (window))) {
+	if (contains_only_virtual_folders(window)) {
 		return FALSE;
 	}
 

