info.icon in HAL

Rodney Dawes dobey at novell.com
Tue Mar 6 08:52:35 PST 2007


On Mon, 2007-03-05 at 19:46 -0500, David Zeuthen wrote:
> On Mon, 2007-03-05 at 19:05 -0500, Rodney Dawes wrote:
> > On Mon, 2007-03-05 at 23:32 +0000, Richard Hughes wrote:
> > > Okay, sounds like a plan. When you guys have decided on freedesktop
> > > names for the icons and we have patches in gnomevfs then us HAL guys
> > > can swing into action.
> > 
> > I've put the guidelines for naming device icons in the Icon Naming Spec
> > in CVS. I've made a list of some names, which will eventually become the
> > Device Icon Naming Addendum. 
> 
> So about names. As mentioned earlier, I'd like the HAL code to compute
> info.icon_name so the property will be set unless it's overridden for a
> specific device in info.icon_name. Now, choosing names is very
> difficult, so here's one proposal.
> 
> For plain disks attached to hotpluggable ports on the systerm, it's
> useful to see the connection type and having a nice logo that reflects
> that (like in Mac OS X). Right now the main game in town is USB and
> Firewire but we might want to add future connection types in the future

I suppose this can be useful for some people, sure. I don't think it is
particularly so, though. At least in terms of usability. Some people do
have weird preferences though. For what it's worth, the new motherboard
I just got for my desktop PC, has an external SATA port on the back. :)
Do those just show up as SCSI, or can we infer more information from
them? It would be really awesome if we could determine what model of
external disk is being connected to the USB, Firewire, or SATA ports.

> For optical drives, people normally only care whether the drive can
> burn. We omit whether it can burn CD-R's, DVD-R's or other types of
> discs (ICBW and we could drop this and expand drive-optical-* instead)
> 
>  drive-optical
>  drive-optical-recorder

I suppose this is fine. I think trying to be smart and show what formats
the drive supports, though, is just going to cause problems. For
example, if I have a BluRay drive, it supports pretty much everything
but HD-DVD and DVD-RAM modules.

> For removable media, it's useful to see what kind of media the drive
> uses otherwise you end up with this kind of window
> 
>  http://people.freedesktop.org/~david/many-drives.png

This is still 100000x better than Windows XP, which simply lists them
all as "Removable Disk" in "My Computer". At least I can see what format
the drive expects, via the text labels, in Nautilus.

>  drive-removable-media
>  drive-removable-media-jaz
>  drive-removable-media-zip
>  drive-removable-media-floppy
>  drive-removable-media-tape
>  drive-removable-media-flash
>  drive-removable-media-flash-compactflash
>  drive-removable-media-flash-memorystick
>  drive-removable-media-flash-sdmmc
>  drive-removable-media-flash-smartmedia

The drive-removable-media-flash-* icons should match the names for the
media-flash-* icons, as per the device-names.txt on my
people.freedesktop.org space. After a few more tweaks, and the closure
of this particular discussion to get the icon_name property into the
HAL spec, I will be writing up a more formal addendum in docbook, for
the device icons.

> Some drives are "special" (this is for USB key chain drives) but also
> very common
> 
>  drive-keyfob

I don't think drive-* is appropriate for these devices. The "drive" in
this case, is technically simply the usb port. The "media" is the
keyfob. An appropriate name would probably be media-flash-disk-usb, as
we could potentially have the same types of devices, working over other
protocols. One of the goals with having the structure of icon names,
that we do, in the Naming Spec, is to be able to work with as little
change as possible, on future hardware and software platforms.

> This covers all the drives which is to say the enclosures for the media,
> whether it's removable or not or how it's partitioned. For drives
> without removable media we'll reuse the drive-* icon for volumes (e.g.
> partitions) on that drive. Drives with removable media have distinct
> icons as the media itself can change
> 
>  media-jaz
>  media-zip
>  media-floppy
>  media-tape
>  media-flash
>  media-flash-compactflash
>  media-flash-memorystick
>  media-flash-sdmmc
>  media-flash-smartmedia
> 
> Typically users wants to see a distinct icon for the disc type
> 
>  media-optical
>  media-optical-dvd
>  media-optical-blueray
>  media-optical-hddvd
>  media-optical-writable
>  media-optical-writable-dvd
>  media-optical-writable-dvd-plus
>  media-optical-writable-blueray
>  media-optical-writable-hddvd
>  media-optical-rewritable
>  media-optical-rewritable-dvd
>  media-optical-rewritable-dvd-plus
>  media-optical-rewritable-dvd-plus-duallayer
>  media-optical-rewritable-blueray
>  media-optical-rewritable-hddvd

These are all in the device-names.txt file in my people.freedesktop.org
space already. Not as you named them exactly, but they are in that file,
and some are even used as examples in the Naming Spec's Devices context
description.

> I'm not at all suggesting that GNOME or KDE or whatever is going to ship
> all these icons but I think it should be possible to create an icon
> theme that uses all of them.

It should definitely be possible. I think the icon naming issues are
probably better discussed in a separate thread on the XDG list though,
rather than the HAL list.

-- dobey




More information about the hal mailing list