allow to have more than one default activity
ClosedPublic

Authored by mart on Feb 8 2018, 3:31 PM.

Details

Summary

since addActivity in layout.js is the wrong place and extremely fragile,
allow to have more than one default activity with custom names
the config key is unchanged so all is retrocompatible, even
if the key being singular isn't 100% correct now

Test Plan

tried with an empty session, works correctly

Diff Detail

Repository
R161 KActivity Manager Service
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
mart created this revision.Feb 8 2018, 3:31 PM
Restricted Application added a project: Plasma. · View Herald TranscriptFeb 8 2018, 3:31 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
mart requested review of this revision.Feb 8 2018, 3:31 PM
davidedmundson added inline comments.
src/service/Activities.cpp
233

We'll end up toggling between activities on startup.
Can we avoid this?

ivan added inline comments.Feb 8 2018, 7:11 PM
src/service/Activities.cpp
125

QStringList{i18n("Default")} should be enough

127

const auto& - IMO, no need to specify the type explicitly here

233

What do you mean by 'toggling' here?

davidedmundson added inline comments.Feb 12 2018, 9:27 AM
src/service/Activities.cpp
233

If the default is "activityA, activityB" I don't want clients (plasmashell) to start loading the layout for activityA and then start loading activityB.

mart added inline comments.Feb 12 2018, 11:28 AM
src/service/Activities.cpp
233

when i tested it it didn't seem to switch to the latest created one without an explicit setCurrentActivity?

ivan added inline comments.Feb 12 2018, 4:27 PM
src/service/Activities.cpp
233

@davidedmundson Haven't looked at that part of Plasma for some time, but I see no reason why it would do that since creating a new activity does not make it current.

mart added inline comments.Feb 13 2018, 1:23 PM
src/service/Activities.cpp
233

setActivityState(activity, Running);
makes it running but *not* current, right?

davidedmundson added inline comments.Feb 13 2018, 1:26 PM
src/service/Activities.cpp
233

yeah, my bad.

Ignore my comment.

mart updated this revision to Diff 27224.Feb 15 2018, 10:28 AM
  • fix syntax
mart marked 2 inline comments as done.Feb 15 2018, 10:29 AM

sorry if it taken so long to answer, issues should be adressed now :)

ivan accepted this revision.Feb 16 2018, 9:39 AM
This revision is now accepted and ready to land.Feb 16 2018, 9:39 AM
This revision was automatically updated to reflect the committed changes.