Notify about low peripheral batteries (mouse, keyboard)
ClosedPublic

Authored by broulik on Jun 1 2016, 2:18 PM.

Details

Summary

When the battery in a non-power supply battery drops below 10% (configurable)
a notification is shown to the user so he or she is not surprised when the
device suddenly stops working.

BUG: 102097
FIXED-IN: 5.7.0

Test Plan

So far I have only tested this with my mouse on a desktop computer,
starting kded5 brings the notification. Needs more testing with a laptop so it
didn't break the default battery handling

Diff Detail

Repository
R122 Powerdevil
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
broulik updated this revision to Diff 4134.Jun 1 2016, 2:18 PM
broulik retitled this revision from to Notify about low peripheral batteries (mouse, keyboard) When the battery in a non-power supply battery drops below 10% (configurable) a notification is shown to the user so he or she is not surprised when the device suddenly stops working. ===....
broulik updated this object.
broulik edited the test plan for this revision. (Show Details)
broulik added a reviewer: Plasma.
Restricted Application added a project: Plasma. · View Herald TranscriptJun 1 2016, 2:18 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
broulik retitled this revision from Notify about low peripheral batteries (mouse, keyboard) When the battery in a non-power supply battery drops below 10% (configurable) a notification is shown to the user so he or she is not surprised when the device suddenly stops working. ===... to Notify about low peripheral batteries (mouse, keyboard).Jun 1 2016, 2:19 PM
broulik updated this object.
broulik added a reviewer: Plasma: Design.
broulik updated this object.

graesslin added inline comments.
PowerDevilSettings.kcfg
35

Given the experience with my trackball: I think I used it for another half year once it dropped below 10 %

daemon/powerdevilcore.cpp
508

In English that's fine, but in e.g. a German translation it would be horrible to suggest to charge a battery. (For non German speakers: a "Batterie" is the non-rechargeable one, an "Akku" is the rechargeable one). Given that it needs i18nc

kcmodule/global/GeneralPage.cpp
123

new connect syntax?

broulik added inline comments.Jun 2 2016, 8:35 AM
PowerDevilSettings.kcfg
35

My trackball has the peculiarity of dropping in 10% or 20% steps, so it might not even trigger then notification when it goes from 20% to 0%. Not sure how to proceed there.

daemon/powerdevilcore.cpp
508

I never explained "Battery" anywhere and they always got it right. (I could show a different text depending on whether it reports the battery as "rechargeable", not sure how reliable that property is, though ;))

kcmodule/global/GeneralPage.cpp
123

I wanted to but the signature doesn't match so I would have had to cramp a lambda in there. Might change that at a later point (where I'll adjust the other connects too)

lueck added a subscriber: lueck.Jun 2 2016, 9:03 AM
lueck added inline comments.
daemon/powerdevilcore.cpp
508

Default german translation for battery is Akku, so obviously no context required

broulik updated this revision to Diff 4163.Jun 2 2016, 2:14 PM
  • Improve peripheral device notification wording

Improved wording, don't cram the device name into the title

colomar added a subscriber: colomar.Jun 2 2016, 5:27 PM

+1 from the usability side, the second wording iteration is indeed an improvement!

broulik updated this object.Jun 3 2016, 1:14 PM
mart accepted this revision.Jun 13 2016, 8:27 AM
mart added a reviewer: mart.
This revision is now accepted and ready to land.Jun 13 2016, 8:27 AM
This revision was automatically updated to reflect the committed changes.