Introduce new pre-layout script hook
ClosedPublic

Authored by davidedmundson on Nov 1 2016, 11:16 AM.

Details

Summary

layout.js used to be run before any containments were added. This was
broken in a697d291 which creates desktop containments for that activity
first.

However, some scripts rely on being able to alter global configuration
before any containments are loaded.

In order to allow the same functionality we need to provide a new hook
for whatever these scripts may need to do.

BUG: 371704

Test Plan

Not done yet.

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.
davidedmundson retitled this revision from to Introduce new pre-layout script hook.
davidedmundson updated this object.
davidedmundson edited the test plan for this revision. (Show Details)
davidedmundson added a reviewer: Plasma.
Restricted Application added a project: Plasma. · View Herald TranscriptNov 1 2016, 11:16 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
mart added a subscriber: mart.Nov 1 2016, 1:03 PM

a bit on the fence on this: is true that this would solve the problem in an elegant way, but would make things more complicated for distributions, adding a new thing to pay attention to and a new thing in which is possible to do wrong things.
in general, not against it, just not too sure.
do you think it could go in 5.8 as well? (i think it should as distros needs fix there too)

apol added a subscriber: apol.Nov 1 2016, 5:53 PM
apol added inline comments.
shell/shellcorona.cpp
884

Why reuse the variable? they can have different names... :/

mart added inline comments.Nov 1 2016, 7:17 PM
shell/shellcorona.cpp
884

what problem can it cause? the value is overwritten anyways there, so there shouldn't be the risk of the old script being executed twice?

mart accepted this revision.Nov 2 2016, 3:13 PM
mart added a reviewer: mart.

Let's go with this, maybe use two different wariables for the script paths, but let's go with it.
even if is a new thing, it should go on 5.8 as well tough.

This revision is now accepted and ready to land.Nov 2 2016, 3:13 PM
This revision was automatically updated to reflect the committed changes.