As I said in my last comment, I would submit my patch when I was done with it, and here it is.
Cited from the changelog of my patched package:
* Added 11_policy_actions_fallback.patch which makes policy actions
fall back to per-percent policy if the battery profile is not good
enough yet. It also ignores the accuracy of the battery profile when
the GCONF key 'use_time_for_policy' is disabled. LP: #135548
* Added 12_fix_critical_message.patch which fixes an error in the
notification messages for critical battery. These messages would
always show 0% battery remaining, since the cell unit object was
reset while generating one of the strings used in the message.
(yup, the second point means I found another bug as well)
I'm attaching the .diff.gz file generated by dpkg-build package, since that is the simplest way for me to attach all my changes in one file.
A small disclaimer: I'm no C guru, and this was actually the first thing I did with GTK based code. That means my solutions may not be "correct", but they work for me, as far as I could tell.
As I said in my last comment, I would submit my patch when I was done with it, and here it is.
Cited from the changelog of my patched package: actions_ fallback. patch which makes policy actions for_policy' is disabled. LP: #135548 critical_ message. patch which fixes an error in the
* Added 11_policy_
fall back to per-percent policy if the battery profile is not good
enough yet. It also ignores the accuracy of the battery profile when
the GCONF key 'use_time_
* Added 12_fix_
notification messages for critical battery. These messages would
always show 0% battery remaining, since the cell unit object was
reset while generating one of the strings used in the message.
(yup, the second point means I found another bug as well)
I'm attaching the .diff.gz file generated by dpkg-build package, since that is the simplest way for me to attach all my changes in one file.
A small disclaimer: I'm no C guru, and this was actually the first thing I did with GTK based code. That means my solutions may not be "correct", but they work for me, as far as I could tell.