Re: [Nautilus-list] Bonobo Property for Icon in sidebar

On Tuesday, March 19, 2002, at 08:06 AM, Glen Gray wrote:

Been trying to track down how to set this for the hardware view. I'm
guessing that it's to do with the property bag for the component (in
get_bonobo_properties a BONOBO_ARG_STRING for ICON_NAME is set to
"computer". What I'm trying to figure out is what uses this string to
create an icon from the name (I presume it needs to load a pixmap so how
does it know what to load). Currently it's not loading anything and a
default icon is displayed.

Tips on how this works are welcome.

The code that finds icons given names inside Nautilus is the "icon factory". The source code is in libnautilus- private/nautilus-icon-factory.c, but I recently broke out the part that finds the icon files to help people with questions like yours. That's in libnautilus-private/nautilus-find-icon-image.c. For most normal cases, the function nautilus_pixmap_file is used to locate the file. A standard set of 3 suffixes is tried, ".svg" then ".png" then ".jpg". There are special cases too, but all the code in is in nautilus-find-icon-image.c.

    -- Darin

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