Re: [PATCH] proxy nautilus_file_is_in_trash to NautilusDirectory
- From: Christian Neumair <chris gnome-de org>
- To: Alexander Larsson <alexl redhat com>
- Cc: nautilus-list <nautilus-list gnome org>
- Subject: Re: [PATCH] proxy nautilus_file_is_in_trash to NautilusDirectory
- Date: Mon, 25 Sep 2006 18:07:27 +0200
Am Montag, den 25.09.2006, 11:26 +0200 schrieb Alexander Larsson:
> On Sun, 2006-09-24 at 14:02 +0200, Christian Neumair wrote:
>
> > Caveat: For trash directories (like ~/.Trash), is_in_trash will be FALSE
> > after the patch is applied, before it was TRUE.
>
> Why did this change?
Because the eel VFS helper returns TRUE for is_in_trash() if the
passed-in URI is trash:///, or if it equals or it is a children of one
of the trash directories on the volume the trash is located on. Because
we pass the request to the parent, ~/.Trash will return the
is_in_trash() info for ~, which is FALSE.
> It breaks a number of uses of is_in_trash() in nautilus.
How?
If you consider this a shortcoming, I suppose is_local() suffers from
the same "issue", i.e. we're interested in the "file" aspect of the FS
object, rather than the "directory" aspect, and so we chain up to the
container.
If you want to establish an identity between the file and the directory
object for these two aspects, you'd IMO have to introduce code like
gboolean ret;
if (nautilus_file_is_directory (file)) {
NautilusDirectory *directory;
directory = nautilus_directory_get_for_file (file);
ret = nautilus_directory_get_is_local (directory);
nautilus_directory_unref (directory);
} else {
ret = nautilus_directory_get_is_local (file->details->directory);
}
return ret;
--
Christian Neumair <chris gnome-de org>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]