[dragon] Show notification restriction text
ClosedPublic

Authored by anthonyfieroni on Mar 5 2018, 6:59 AM.

Details

Summary

Starting 5.31 KNotificationRestriction supports reason text which is shown in battery and brightness applet.
Bump minimum required version of KF5 and Qt

Test Plan

before:

after:

Diff Detail

Repository
R259 Dragon Player
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
anthonyfieroni requested review of this revision.Mar 5 2018, 6:59 AM
anthonyfieroni created this revision.
sitter added a comment.Mar 5 2018, 7:29 AM

Are you sure this is used in the battery applet? I really don't see how notifications relate to that applet. Surely it'd be using PM inhibitions which are an entirely different thing?

CMakeLists.txt
68

You could just remove the flag entirely, it's only used in main.cpp to conditionally use kcrash api.

src/app/mainWindow.cpp
839

Please use i18nc to give translators a context for this string. Something like "Notification inhibition reason".

https://techbase.kde.org/Development/Tutorials/Localization/i18n#Adding_Context_with_i18nc.28.29

Also, this should probably start with a capital P.

anthonyfieroni marked 2 inline comments as done.
anthonyfieroni edited the test plan for this revision. (Show Details)
sitter added a subscriber: broulik.EditedMar 5 2018, 7:48 AM

Paging @broulik

Why does the battery applet show the inhibition for notifications?

Why does the battery applet show the inhibition for *notifications*?

That class is poorly named and the code clearly creates a screensaver inhibition which are shown in battery monitor as intended. (This is also consistent with Chromium which also shows "Playing video" etc)

sitter added a comment.Mar 5 2018, 9:16 AM

Fair enough but even screensaver inhibition isn't the same as power management inhibition?

Fair enough but even screensaver inhibition isn't the same as power management inhibition?

It's something that keeps your screen on and is all that counts for that.

sitter accepted this revision.Mar 5 2018, 10:11 AM
This revision is now accepted and ready to land.Mar 5 2018, 10:11 AM
This revision was automatically updated to reflect the committed changes.