Re: [PATCH] proxy nautilus_file_is_in_trash to NautilusDirectory



On Tue, 2006-09-26 at 17:41 +0200, Christian Neumair wrote:
> Am Dienstag, den 26.09.2006, 09:41 +0200 schrieb Alexander Larsson:
> > On Mon, 2006-09-25 at 18:07 +0200, Christian Neumair wrote:
> > > 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?
> > 
> > The problem is that a directory in trash:// will not open to
> > trash://dir/ but to ~/.Trash/dir, so any check for is_in_trash (like for
> > instance the one that decides on move-to-trash or delete-from-trash in
> > the context menu) will get things wrong.
> 
> I disagree. The request to ~/.Trash/dir will be proxied to ~/.Trash,
> which will return TRUE because "the eel VFS helper (also) returns TRUE
> for is_in_trash() if the passed-in URI (...) equals (...) one of the
> trash directories on the volume (...) (the file corresponding to
> passed-in URI) is located on).". In short:
>  eel_uri_is_in_trash ("file:///home/alex/.Trash")
> returns TRUE, so the proxy won't hurt.

I see what you mean. So it means that we'll only get the trash menu item
wrong for the ".Trash" item in the $home directory (and other similar
cases). I think thats acceptable, since these are normally hidden
anyway. 

It also means we won't disable the file creation menu items in ~/.Trash
like we do in trash://. But we seem to get that wrong already anyway for
some reason.

Anyway, please commit.

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Alexander Larsson                                            Red Hat, Inc 
                   alexl redhat com    alla lysator liu se 
He's a war-weary ninja farmboy with nothing left to lose. She's a 
transdimensional extravagent traffic cop with an evil twin sister. They fight 
crime! 




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]