Thoughts about libhal-storage

David Zeuthen david at fubar.dk
Fri Oct 8 08:44:44 PDT 2004


On Sun, 2004-09-26 at 20:14 +0200, Jérôme Lodewyck wrote:
> Hi,
> 
>  I lately updated kvm to make use of libhal-storage, and have a few remarks :
> 

Hi,

Sorry for the lag

> 1/ there is an extra underscore in libhal-storage.h at #define  
> LIBHAL_STORAGE__H (caused a lot of insults from gcc !)
> 

Fixed, thanks!

> 2/ about icons : in kde, we don't really deal with icons, but with mimetypes. 
> When attributing a mimetype to a device, it is automatically associated to 
> the icon defined in the mimetype .desktop file. Would it make sense to define 
> a mimetype policy, instead of an icon policy ?
> 

I guess we can do both? Are the mime-types you use in KDE standardized?

> 3/ always about mimetypes/icons : in kde, they all have two versions : one 
> with _mounted suffix, one with _unmounted ("mounted" icons boast a gracefull 
> green triangle indicating that the device is mounted). What about it ?
> 

This should be possible today - the way it works for GNOME and Nautilus
is that the Drive icon is used when not mounted and the Volume icon is
used when mounted. 

We can also add a set of extra icons identifiers (e.g.for
HAL_STORAGE_ICON_VOLUME_COMPACT_FLASH we would also have
HAL_STORAGE_ICON_VOLUME_COMPACT_FLASH_MOUNTED) though I'm not sure this
is a good idea - primarily because "being mounted or not" is not
something that is an attribute of the media or drive - it's an attribute
of how it's used - on the same note we shouldn't have icons for a disc
with a DVD movie because the fact it's a DVD movie is the contents of
the media, not an inherent property of the media. In GNOME the way this
is envisioned to work is by using emblems on top of icons, does KDE have
a similar scheme?

> 4/ in kvm, a systray icon listing devices and making unmount operation easy. 
> This icon lists "devices that should be unmounted by the user before 
> unplugging"
> The question is : What is the hal property corresponding to this sentence :
>  - storage.hotpluggable ?
>  - storage.removable ?
>  - both ?
>  - something else ?
> 

The way UNIX-like stuff works, and Linux in particular, works you always
need to unmount your media before unplugging something :-). Some people
say you can get around to whether something is mounted sync but this is
not enought really, sorry.

> 5/ is the device name suitable ? For example, my usb key is named "512 M 
> remobable media", whereas in my opinion "DataTraveler, 512 M" would be better 
> (info.product key) since this is the name written on the key...
> 

Kay covered that one.

> 6/ I vote in favor of the hotplug-map patch for debian libgphoto2 usbmaps
> 

I think I've already merged that one!

Thanks!
David

_______________________________________________
hal mailing list
hal at freedesktop.org
http://freedesktop.org/mailman/listinfo/hal



More information about the Hal mailing list