Version: (using KDE 4.0.0) Installed from: SuSE RPMs I have a Dell 8600C. I have two battery slots, but only one battery is installed. The battery applet shows 2 batteries one is always 0%. And this goes into the summary, so my maximum charge is 50%. Or I can have the batteries separately displayed, but in that case the second one is there for nothing since it's always empty Instead of (or besides) the "show the state of each battery" I'd like two have a list where I can select which battery I want to see and include into the summary. hope ti makes sense :)
*** This bug has been marked as a duplicate of 155239 ***
Created attachment 23314 [details] Patch against svn revision 767340 This patch adds a configuration option for the battery widget to make it ignore empty batteries bays.
Reopening this. The discussion in bug 155239 has closed without taking into account the option of ignoring missing batteries. bug 156652 resulted but it asks for the selection of an arbitrary battery which is beyond simply omitting the missing batteries. I have also added a patch to add this functionality and hope it can get tested and committed.
In fact selecting the battery of interest is not the same as ignoring missing batteries. If a battery is plugged in, this battery would get ignored if it is not selected to start with.
I think a nicer solution would be to ignore empty bays when 'cumulative' mode is used. That saves a config option. Also, I can't think of a usecase where it makes sense to keep an empty bay into account when checking for charge percentage. I have committed a patch which does that last Saturday, can you check if this behaviour works for you, and re-open + explain why it doesn't if not?
The code currently (svn of now, revision 767556) still takes empty bays into account in cumulative mode. In particular I think that the patch from Revision 766341 to 766875 puts an if () in the wrong part of the code (at line 542 instead of 555)
Created attachment 23332 [details] Fix counting of batteries so that the cumulative charge ignores empty batteries
I still think that the patch in comment 2 is useful if you want to show battery details, yet only the present batteries are to be shown. Thus if you have 2 batteries and one is missing, only 1 is shown. When you plug in the second one, it gets displayed next to it. (I have not tested hotplugging, and it might need an additional update() call in the dataUpdated() function)
Useful, maybe, but I wonder how common this case actually is. I'd like to avoid cluttering the UI too much, and such a config option comes at a certain cost .... I've corrected the battery_num counting, thanks for that!
I would agree that adding additional option would be adding lots of complexity (used by limited number of users). I think best would be to just add/remove plugged batteries automatically (always). No battery case would therefore be only used if there is no battery at all.
See also bug 156652