Re: [PATCH] Virtual folder properties



On Wed, 2006-12-27 at 23:41 +0100, Tom Parker wrote:
> Now with actual patch....
> 
> On Wed, 27 Dec 2006 23:39:06 +0100, Tom Parker <palfrey tevp net> wrote:
> > 
> > On Tue, 26 Dec 2006 09:00:03 -0800, "Gene Z. Ragan" <diskzero mac com>
> > wrote:
> >> vague. Something like contains_only_virtual_folders would work well
> >> and be descriptive.
> > 
> > Attached updated patch with that change.
> > 
> >> I am also wondering why NautilusFile does not have a method that does
> > 
> > Not sure. There's fair collection of other methods, and lots of properties
> > to query, but I can't seem to find a better currently existing method. This
> > property does look to be useful elsewhere.

Why remove custom buttons feature for e.g. Computer? I've seen people
use that.

+	if (type == NAUTILUS_DESKTOP_LINK_VOLUME || type==NAUTILUS_DESKTOP_LINK_HOME)
+		return FALSE;

I prefer to explicitly list what types are virtual instead of which ones
are not. In case the list changes later.

Also, the patch has some indentation issues (like missing spaces aroung
places like a==b).

As to Genes question on a nautilus_file_is_virtual() call. I dunno. The
term "virtual" is so broad that you don't really know what it means. The
term can be used for many things inside the nautilus codebase. And such
a function doesn't even work for this case, because we have to do
different things for should_show_custom_icon_buttons for trash and
Computer.

If we really wanted abstraction here we could add more explicit things
to NautilusFile like _can_change_icon() though. I'm not sure its
required though.

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Alexander Larsson                                            Red Hat, Inc 
                   alexl redhat com    alla lysator liu se 
He's a deeply religious Jewish romance novelist on his last day in the job. 
She's an artistic extravagent doctor with an evil twin sister. They fight 
crime! 




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