[OSD] Allow disabling OSD through config file
ClosedPublic

Authored by broulik on Jun 5 2016, 6:53 PM.

Diff Detail

Repository
R120 Plasma Workspace
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 4218.Jun 5 2016, 6:53 PM
broulik retitled this revision from to [OSD] Allow disabling OSD through config file.
broulik updated this object.
broulik edited the test plan for this revision. (Show Details)
broulik added a reviewer: Plasma.
broulik set the repository for this revision to R120 Plasma Workspace.
Restricted Application added a project: Plasma. · View Herald TranscriptJun 5 2016, 6:53 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript

can you explain why it should be configurable?

shell/osd.cpp
36

sharing a lesson learned from KWin: if you dependency inject the KSharedConfig you get two advantages:

  1. No stringly-typed names like plasmarc
  2. the class is easier to test as in a unit test you can inject a dummy KSharedConfig exactly with the key/values as one needs.
mart added a subscriber: mart.Jun 6 2016, 8:13 AM

this configuration is intended for kiosk setups?

if it's hidden, there is always the risk of bitrot

mart accepted this revision.Jun 7 2016, 11:41 AM
mart added a reviewer: mart.

ah, ok fine then ;)

This revision is now accepted and ready to land.Jun 7 2016, 11:41 AM
broulik updated this revision to Diff 9898.Jan 9 2017, 10:04 AM
broulik edited edge metadata.
  • Inject KSharedConfig::Ptr from outside
broulik updated this revision to Diff 9923.Jan 9 2017, 3:42 PM
  • Introduce a shared config for plasmarc, used by both OSD and LNF thingie
broulik updated this revision to Diff 9926.Jan 9 2017, 3:54 PM
  • Watch plasmarc to monitor changes to the OSD setting at runtime
graesslin added inline comments.Jan 9 2017, 4:49 PM
shell/shellcorona.cpp
224–227

Is there no mechanism inside Plasma to notice when the config changes?

davidedmundson added inline comments.
shell/shellcorona.cpp
226

KDirWatch::self() is a singleton

consider the case where two things use the singleton, you use it to monitor ~/.plasmarc and another uses it to monitor /tmp/asdfadf this signal will be emitted in both cases. You should use the parameter in the signal to do some filtering.

broulik updated this revision to Diff 9995.Jan 10 2017, 4:44 PM
  • Check for dirty path in KDirWatch slot
This revision was automatically updated to reflect the committed changes.