Le 14 sept. 07 à 00:42, David Chisnall a écrit : > Hi Andreas, > > I had a little look at the code and screenshot, and it looks > promising. A few minor things:
There is an apm-based Power status menulet in Étoilé repository: <http://svn.gna.org/viewcvs/etoile/trunk/Etoile/Bundles/PowerMenulet/> > - It seems to be Linux-only. Étoilé is a cross-platform project, and > there is no abstraction layer between the Linux-specific code and the > rest, which will make this very difficult to port to other > platforms. Take a look at Etoile/Services/Private/MenuServer/ > Subprojects/AboutEtoileEntry/ETMachineInfo* for a clean way of doing > this. This class provides info about the amount of real memory and > the CPU model / speed, and works on Linux, FreeBSD, OpenBSD, Darwin > and Solaris. Well Étoilé has an abstraction layer for hardware-related and host system configuration (sound, monitor, mouse, network etc.). It is called SystemConfig and needs a lot of work :-) You can find it in trunk/Etoile/Framework/SystemConfig See also my recent mail on etoile-dev. > - It seems like the battery reading code seems incredibly > complicated. On FreeBSD, reading the battery level just involves > reading the hw.acpi.battery.life sysctl, and reading the number of > minutes of life remaining just involves reading > hw.acpi.battery.time. Between them, these are about six lines of > code. Is Linux really so much more complicated? I don't really know :-)… It may be interesting to leverage existing work done for Freedesktop HAL, specially for all suspend operations which are really hard to get right and vary a lot depending on the hardware and the host system. There is a DBus / HAL power management spec here: <http:// www.freedesktop.org/wiki/Specifications/power-management-spec> Cheers, Quentin. _______________________________________________ Etoile-discuss mailing list [email protected] https://mail.gna.org/listinfo/etoile-discuss
