Re: Searching for trash folders
- From: William Lachance <wlach nit ca>
- To: Alexander Larsson <alexl redhat com>
- Cc: Nautilus <nautilus-list gnome org>
- Subject: Re: Searching for trash folders
- Date: Fri, 05 Dec 2003 11:58:47 -0500
O.k., I forward "ported" the patch to HEAD (I just did the changes
myself, but the code is so similar that I think the old patch might have
just worked as is). Good to know that my suspicions were well founded.
--
William Lachance <wlach nit ca>
--- nautilus-trash-directory.c 2003-12-05 11:42:14.000000000 -0500
+++ nautilus-trash-directory.c 2003-12-05 11:47:17.000000000 -0500
@@ -55,35 +55,6 @@
GNOME_CLASS_BOILERPLATE (NautilusTrashDirectory, nautilus_trash_directory,
NautilusMergedDirectory, NAUTILUS_TYPE_MERGED_DIRECTORY)
-#define TRASH_SEARCH_TIMED_WAIT_DELAY 20000
-
-static int pending_find_directory_count = 0;
-
-static void
-find_directory_start (void)
-{
- if (pending_find_directory_count == 0) {
- eel_timed_wait_start_with_duration (TRASH_SEARCH_TIMED_WAIT_DELAY,
- NULL,
- add_volume,
- _("Searching Disks"),
- _("Nautilus is searching your disks for trash folders."),
- NULL);
- }
-
- ++pending_find_directory_count;
-}
-
-static void
-find_directory_end (void)
-{
- --pending_find_directory_count;
-
- if (pending_find_directory_count == 0) {
- eel_timed_wait_stop (NULL, add_volume);
- }
-}
-
static void
find_directory_callback (GnomeVFSAsyncHandle *handle,
GList *results,
@@ -102,8 +73,6 @@
g_assert (trash_volume->real_directory == NULL);
g_assert (trash_volume->handle == handle);
- find_directory_end ();
-
/* We are done with the async. I/O. */
trash_volume->handle = NULL;
@@ -188,7 +157,6 @@
vfs_uri_as_list.prev = NULL;
/* Search for Trash directories but don't create new ones. */
- find_directory_start ();
gnome_vfs_async_find_directory
(&trash_volume->handle, &vfs_uri_as_list,
GNOME_VFS_DIRECTORY_KIND_TRASH, FALSE, TRUE, 0777,
@@ -246,7 +214,6 @@
if (trash_volume->handle != NULL) {
gnome_vfs_async_cancel (trash_volume->handle);
- find_directory_end ();
}
if (trash_volume->real_directory != NULL) {
if (! finalizing) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]