Switching activity while creating it from PlasmaScript

Authored by ivan on Jul 18 2016, 4:14 PM.

Description

Switching activity while creating it from PlasmaScript

Summary:
Containment creation relies on the current activity, so
we need to change the current activity when creating one
from PlasmaScript in order for the Containment to be created
correctly.

Test Plan:
Tested with:

print(currentActivity());
var id = currentActivity();
var desktops = desktopsForActivity(id);
print(desktops.length);
for (var i = 0; i < desktops.length; ++i) {
    print(desktops[i].id);
}

var id = createActivity("Day 4 - Test 1 - " + activities().length);
var desktops = desktopsForActivity(id);
for (var i = 0; i < desktops.length; ++i) {
    print(desktops[i].id);
}

Reviewers: Plasma, mart

Reviewed By: mart

Subscribers: plasma-devel

Tags: Plasma

Differential Revision: https://phabricator.kde.org/D2211

Details

Committed
ivanJul 18 2016, 9:33 PM
Reviewer
mart
Differential Revision
D2211: Switching activity while creating it from PlasmaScript
Parents
R871:85d721b91f46: ScriptEngine exports the list of activities known to Plasma
Branches
Unknown
Tags
Unknown