battery applet - charge time instead of charge percentage.

Marcos Dione mdione at
Tue Jan 6 01:14:03 CET 2009

    as I mentioned in IRC, I have a patch for this. as sebas and aseigo
suggested, I'm sending it here.

    now, right now there are 3 bugs: the remaining time, either for
total discharge when the AC is plugged off and the complete recharge
time when the AC is plugged back in.

    the first one is that the time jumps a lot depending on the laptop's
laod. just IRC'ing and lkistening to music makes it change from 3h to
2:50. not a big gap, but misleading anyways. I haven't tested yet what
happens when the charge is really low. the second one is that the time
'till the battery is fully recharged starts very big, like 6h, then
settles to more real time, like 10m. both problems lay deeper than this
applet, they come from powerdevil or even deeper, I just didn't check.

    the third one is avoidable, really. I coded it so when the battery
is fully charged it shows 'Charged' instead of 0:00. the problem is that
right now it doesn't set its width (not again!) so the tect fits. this
can be 'solved' just removing an simple if until I hack the final code.

    so, whithout further addo, here it is. as always, comments are more
than welcome.

(Not so) Random fortune:
Maebe: Do you guys know where I could get one of those gold T-shaped
Michael: That's a cross.
Maebe: Across from where?
	    -- Arrested development
-------------- next part --------------
A non-text attachment was scrubbed...
Name: battery_applet-show_remaining_time.diff
Type: text/x-diff
Size: 9622 bytes
Desc: not available
Url : 

More information about the Plasma-devel mailing list