patches/nautilus-01-trash-only-home.diff
author yippi
Mon, 27 Sep 2010 21:07:51 +0000
changeset 20108 51df67ca9307
parent 17693 b3791b2d1347
child 22007 34c4666a5f42
permissions -rw-r--r--
I had these modules listed as being owned by me, but they are really owned by wangke, correcting.

/jds/bin/diff -uprN nautilus-2.26.3.old/libnautilus-private/nautilus-file-operations.c nautilus-2.26.3/libnautilus-private/nautilus-file-operations.c
--- nautilus-2.26.3.old/libnautilus-private/nautilus-file-operations.c	2009-04-20 11:57:19.000000000 +0100
+++ nautilus-2.26.3/libnautilus-private/nautilus-file-operations.c	2009-07-13 11:11:03.239850000 +0100
@@ -2062,41 +2062,10 @@ dir_has_files (GFile *dir)
 static GList *
 get_trash_dirs_for_mount (GMount *mount)
 {
-	GFile *root;
-	GFile *trash;
-	char *relpath;
-	GList *list;
-
-	root = g_mount_get_root (mount);
-	if (root == NULL) {
-		return NULL;
-	}
-
-	list = NULL;
-	
-	if (g_file_is_native (root)) {
-		relpath = g_strdup_printf (".Trash/%d", getuid ());
-		trash = g_file_resolve_relative_path (root, relpath);
-		g_free (relpath);
-
-		list = g_list_prepend (list, g_file_get_child (trash, "files"));
-		list = g_list_prepend (list, g_file_get_child (trash, "info"));
-		
-		g_object_unref (trash);
-		
-		relpath = g_strdup_printf (".Trash-%d", getuid ());
-		trash = g_file_get_child (root, relpath);
-		g_free (relpath);
-
-		list = g_list_prepend (list, g_file_get_child (trash, "files"));
-		list = g_list_prepend (list, g_file_get_child (trash, "info"));
-		
-		g_object_unref (trash);
-	}
-	
-	g_object_unref (root);
-	
-	return list;
+	/* This is called only when unmounting so we can safely return NULL 
+	 * as only $HOME will contain Trash folder.
+	 */
+	return NULL;
 }
 
 static gboolean
diff -ruN nautilus-2.29.91.orig/configure.in nautilus-2.29.91/configure.in
--- nautilus-2.29.91.orig/configure.in	2010-03-12 18:07:38.672521666 +0000
+++ nautilus-2.29.91/configure.in	2010-03-12 19:01:39.338873686 +0000
@@ -415,8 +415,8 @@
 CORE_LIBS="`$PKG_CONFIG --libs $CORE_MODULES` $x_libs"
 AC_SUBST(CORE_LIBS)
 
-DISABLE_DEPRECATED_CFLAGS="-DG_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED"
-AC_SUBST(DISABLE_DEPRECATED_CFLAGS)
+#DISABLE_DEPRECATED_CFLAGS="-DG_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED"
+#AC_SUBST(DISABLE_DEPRECATED_CFLAGS)
 
 dnl Multimedia keys
 AC_CHECK_HEADERS([X11/XF86keysym.h])