Created attachment 3701 Some fixes for version 1.0.10 under FreeBSD I've managed to make xfce4-power-manager v1.0.10 work on my laptop under FreeBSD 8.2-RELEASE. (The one in the ports is old and needs HAL which I wanted to get rid of) Beside basic compilation, these are the issues I came across: - When you select the option of always showing the icon in the notification area, I found that the AC adapter icon did not show up when the battery was not present. When the battery was inserted into the laptop, the battery icon showed up. When removed again, a 'not found' icon appeared and clicking on it made the program crash. After running with the --debug switch, I found that under FreeBSD (unlike Linux), the battery is always reported as 'present'. When the battery is not actually in the slot, the state of the battery is reported as 'unknown'. The programs doesn't show the AC adapter icon because it thinks the battery is always there, and worse it tries to display the icon of the battery when in the 'unknown' state (not there). I've managed to 'fix' the issue by testing the state of the battery and not simply it's presence. - Also after the initial fix I found that the AC adapter icon did not refresh when the battery was inserted or removed. (A second icon appeared instead) I've added a callback to 'xfpm_power_refresh_adaptor_visible' which seems to fix the issues. However I'm uncertain if that is a correct approach. -- The diff to the files: configure src/xfpm-polkit.c Are needed to configure and compile under FreeBSD 8-2-RELEASE. The diff in the following files fixes the other issues I had: src/xfpm-power.c src/xfpm-battery.h src/xfpm-battery.c The patch was also tested under Linux to make sure I wasn't breaking anything.
Created attachment 3702 Some fixes to version 1.0.10 for FreeBSD
This patch is still necessary for xfce4-power-manager v1.1.0 under FreeBSD ?
I have no idea. The new version isn't even present on the project page yet. It's rather easy to test if you have a laptop. Just swap the battery in and out and see if the panel icon misbehave.
We successfully built git master on FreeBSD so this bug should be resolved: http://li604-44.members.linode.com:8080/job/xfce4-power-manager/