Hello, Very glad to see that feature has been added, however it is not as reliable at as it is from the window menu. When trying move move windows to a different activity from task manager, it only works sometimes, whereas it always works from the window menu. Most of the time if I use the activity manager to switch a window to a different activity (say I'm on activity 1 and I want to switch one window to activity 2), nothing happens and when I go back again to the activity menu from task manager nothing has changed (activity 2 is not ticked). Sometimes it does work though but I couldn't establish a pattern of when it does/doesn't work to provide more details. This bug was present in Plasma 5.8.x and still present in 5.9.0. Sorry I should have reported it before. Best Gauthier
David?
Confirmed, checking any menu item isn't working. menuItem.clicked.connect((function(activityId) var checked = menuItem.checked; is always false even though we clearly just checked the damn thing. I have no idea where that puts the real bug. Debug in p-f shows the QAction is unchecked at the time of calling menuItem.checked Virtual desktops doesn't have that problem because it always knows clicking == activate this index, activities are more complex because of the cardinality.
I didn't look into this at all yet, but FWIW from my experience in this code it's usually some scoping/closure related code where some captured variable has an outdated value or something isn't actually reachable and something else hides the ReferenceError.
Should status be changed to confirmed? (who is supposed to changed status btw? Is it the person who opened the ticket or the person who is actually trying to solve the problem...I wish my programming skills would be better btw so I could be helpful in actually solving issues I report!)
Git commit e5df3ded85c94f0a33afe12b18e6afad96f12639 by David Edmundson. Committed on 24/02/2017 at 14:24. Pushed by davidedmundson into branch 'Plasma/5.9'. Avoid capturing MenuItem instead determine checked state from toggled signal Summary: Due to JS lambdas menuItem is being captured by reference, and as such the call to menuItem.checked returns the checked state of the last item in the for loop. Instead of adding to the capture this patch uses the supplied boolean from the QMenuItem::toggled signal. Also unlike Array.concat Array.splice alters the current array, we don't want to create a new var. Test Plan: Debug of menuItem.text showed we were capturing the wrong thing Clicked window into multiple activities and unticked them. All worked as intended Reviewers: #plasma Subscribers: plasma-devel Tags: #plasma Differential Revision: https://phabricator.kde.org/D4757 M +5 -6 applets/taskmanager/package/contents/ui/ContextMenu.qml https://commits.kde.org/plasma-desktop/e5df3ded85c94f0a33afe12b18e6afad96f12639
This now works well indeed, great work and thanks! Just a small suggestion for usability...(not a bug as such): Currently when you tick activity from the menu, the menu closes straight meaning that you got to reopen the menu if you want to tick or untick another activity. That means that you can do only one activity choice a the time or you have to open the menu several time. Again not a big deal but thought I'd flag it out. Cheers Gauthier
Hello, could this fix be back ported to plasma 5.8 in the next bug fix release?
Sure.
Thanks! Now just need to wait till next 5.8 release :)
Yep, I backported it on July 7th.