Re: GVFS and icon lookup



On Tue, 2007-10-02 at 11:55 +0200, Luca Ferretti wrote:
> Alex, I think that you still have to implement it, and I didn't read all
> GIO related messages on list, but do you think could be a good idea to
> provide "generic icon fallback" as described in Icon naming spec?
> 
>         The dash “-” character is used to separate levels of specificity
>         in icon names, for all contexts other than MimeTypes. For
>         instance, we use “input-mouse” as the generic item for all mouse
>         devices, and we use “input-mouse-usb” for a USB mouse device.
>         However, if the more specific item does not exist in the current
>         theme, and does exist in a parent theme, the generic icon from
>         the current theme is preferred, in order to keep consistent
>         style.
>         <http://standards.freedesktop.org/icon-naming-spec/latest/ar01s03.html>
>         
> This is yet in GTK+ (see resolved bug 396901), but it could be useful
> for GIO too, at least if you are planning to use icon management in
> GIO/GVFS to check, for example, the kind of disc you are reading (CDR,
> CDRW, DVD...) and display the proper icon if available
> (media-optical-cdr, media-optical-cdrw, media-optical-dvd..) or MIME
> types.
> 
> Or maybe, GIO/GVFS will only provide the icon name, and GTK+ will fetch
> the proper icon?

Gio has the needed API to support this. When you return an icon for a
file that uses themed icons you return a GThemedIcon object, and that
can specify a list of icon names. That was added precisely to allow this
to work (and other forms of generic icon like generic mimetype icons for
e.g. all "document" types). Of course, it is not currently implemented
in gvfs, but its on the TODO list, and the API is there.




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