Subject: Re: Help needed with Xfce plugins
To: Martti Kuparinen <martti.kuparinen@iki.fi>
From: Kouichirou Hiratsuka <hira@po6.nsk.ne.jp>
List: pkgsrc-users
Date: 05/01/2007 01:50:12
--Multipart_Tue_May__1_01:50:12_2007-1
Content-Type: text/plain; charset=US-ASCII

Hello,

At Wed, 25 Apr 2007 11:29:42 +0300,
Martti Kuparinen wrote:
> 
> Kouichirou Hiratsuka wrote:
> > I have a xfce4-battery-plugin.  It works fine on NetBSD-current/i386
> > with ACPI apm emulation.
> 
> Thank you very much!
> 
> I've imported this into pkgsrc-wip, please test this and let me know if this 
> works for you or not.

Thanks for importing it.  It works fine for me.
BTW, please update patch-aa.

 - Don't change behavior of remaining time on Linux and FreeBSD.
 - Don't print remaining percentage as `100%' if there are no
   batteries.

> I'm interested in results in NetBSD 3.1 and 4.0_BETA2 as I'm personally using 
> NetBSD 4.99.x.

I'll test it on 4.0_BETA2 this weekend.

best regards.
--
 Kouichirou Hiratsuka
   hira@po6.nsk.ne.jp


--Multipart_Tue_May__1_01:50:12_2007-1
Content-Type: application/octet-stream
Content-Disposition: attachment; filename="patch-aa"
Content-Transfer-Encoding: base64

JE5ldEJTRCQKCi0tLSBwYW5lbC1wbHVnaW4vYmF0dGVyeS5jLm9yaWcJMjAwNy0wMS0xOCAwMjo1
Njo1MS4wMDAwMDAwMDAgKzA5MDAKKysrIHBhbmVsLXBsdWdpbi9iYXR0ZXJ5LmMJMjAwNy0wNS0w
MSAwMTozMjo0OS4wMDAwMDAwMDAgKzA5MDAKQEAgLTM1LDYgKzM1LDcgQEAKICNpbmNsdWRlIDxz
eXMvaW9jdGwuaD4KICNpbmNsdWRlIDxtYWNoaW5lL2FwbXZhci5oPgogI2RlZmluZSBBUE1ERVZJ
Q0UgIi9kZXYvYXBtIgorI2RlZmluZSBfQUNQSV9BUE1fQkFUVF9VTktOT1dOIDB4ZmZmZiAvKiBm
cm9tIHN5cy9kZXYvYWNwaS9hY3BpX2FwbS5jICovCiAjZWxp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