Re: [Nautilus-list] NautilusScalableIcon: how to make one?

Ryan Muldoon <rpmuldoon students wisc edu> writes:

> Hi - I'm working on Bugzilla bug #8063, which is adding a right-click
> menu to the "up" button in the toolbar.  I think I have most of my patch
> done, thanks to the very clean and easy to understand code in Nautilus
> (at least the files I've looked at).  However, the major sticking point
> that I have now is actually populating the list of parent uris for the
> menu itself.  I understand what to do conceptually, and following how
> the back_list and forward_list do has made my job easier.  From looking
> at them, I see that they are glists of NautilusBookmarks.  So I am
> trying to do the same.  So, I am trying to use
> nautilus_bookmark_new_with_icon(const char *uri, const char *name,
> NautilusScalableIcon *icon).  The first two are no problem.  The last,
> however, is proving to be a problem.  What is the constructor for a
> NautilusScalableIcon?  I tried looking at, and asking on
> #nautilus, but I was unable to find an answer.  Any help would be
> greatly appreciated!

nautilus_icon_factory_get_icon_for_file in
libnautilus-extensions/nautilus-icon-factory.h is the call you
want. You need a NautilusFile object where you have monitored or
waited for the appropriate set of attributes.

Putting a right-click menu on the up button does raise a couple of
issues. If you compute it ahead of time, would you want to do it for
ftp sites or web sites? That could mean a lot of extra network traffic
when browsing around. Also, in the case of a web site "up" can often
be an operation that does not make sense anyway.

Anyway, it's great to see you working on this feature.

Maciej Stachowiak
Eazel, Inc.

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