Re: A battery applet...



Quoting Sergey Udaltsov <sergey udaltsov gmail com>:

> There is some work going in the HAL project, related to the devices
> having batteries. First result of this work is exposed in the patch
> submitted to the HAL specs (see the "battery" section).

Finally...

> Would it make sense to modify existing applet - just allowing user to
> choose among available battery units - or there should be completely
> different approach? Will user understand what he is asked about? What
> the list of devices should look like? For a moment, the "info.product"
> property can deliver on my laptop something like:
> - "Computer"
> - "USB receiver"

Upon looking at the source for the current applet you'll realise what a bad idea
this is. The applet needs to be rewritten, I've been waiting a while now for HAL
support.

Of course, using HAL directly might not prove to be the right solution either.
Especially if each HAL request translates into a request to /proc. I'm not sure
if HAL will hold state for us. Since calls to /proc/acpi are somewhat expensive,
it might be better to abstract it through PowerManager (the piece of vaporware
I've been talking about for months) or at least make it modular enough that we
can do this at a later date.

It will also be important to receive "battery level has changed" events
asyncronously, I think HAL will be able to do this though.

This could be implemented very badly, very easily (look at the current applet).
Basically power management sucks at the moment, and we do need a rich power
management API.

Further applet-based technical discussion should take place on gnome-utils-list,
the official home of Applets.

--d

-- 
Davyd Madeley              http://www.davyd.id.au/

PGP Fingerprint <http://www.davyd.id.au/pgp/>
08B0 341A 0B9B 08BB 2118  C060 2EDD BB4F 5191 6CDA



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