Bug 200981

Summary: When a screen is added, the new container have the actions duplicated
Product: [Unmaintained] plasma4 Reporter: Alex Fiestas <afiestas>
Component: multiscreenAssignee: Plasma Bugs List <plasma-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: asraniel, binner
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Unspecified   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Patch for plasma (app), that takes care if a containment already exists
Patch for kdelibs plasma, that add the signal existingContainmentAdded

Description Alex Fiestas 2009-07-21 13:09:37 UTC
Version:            (using Devel)
Installed from:    Compiled sources

1-Launch plasma-desktop when you've only 1 screen. 
2-Add a new screen extending your desktop.
3-Open to the button in the corner.
4-You'll see that the ToolBoxActions are duplicated.
If you repeat this more than once, the number of ToolBoxActions will be exponential.

I've tried to fix this, but I don't have enough time to understand how it works :( but I can write here some technical things that may help.

Flow inside the code:
1-When a new screen is added, checkScreens-->checkScreen is called.
2-checkScreen have a few conditionals, which emit containmentAdded signal whatever the containment already exists or not.
3-Then, PlasmaApp::containmentAdded is called because of the signal, and this function add the ToolBoxActions.

The error: If the containment already exists, and already have actions, they will be duplicated.

I tried to create a new signal "existingContainmentAdded" but it produce some odd behaviors, so I stop my research here.

Thanks!
Comment 1 Alex Fiestas 2009-07-22 15:52:42 UTC
Created attachment 35549 [details]
Patch for plasma (app), that takes care if a containment already exists
Comment 2 Alex Fiestas 2009-07-22 15:53:25 UTC
Created attachment 35550 [details]
Patch for kdelibs plasma, that add the signal existingContainmentAdded
Comment 3 Alex Fiestas 2009-07-22 15:57:36 UTC
I've made a patch for this bug, The patches might be wrong but at least they show what's the problem, and how I workaround it.
Comment 4 Beat Wolf 2009-07-22 17:23:23 UTC
You might consider sending your patch to 
http://reviewboard.kde.org/dashboard/
because there it will be noted sooner by the important people
Comment 5 Alex Fiestas 2009-07-22 17:28:26 UTC
I just don't want to bother in more than one place at the same time. I'll put it in reviewboard too. Thanks!
Comment 6 Beat Wolf 2009-08-24 13:31:20 UTC
whats the status of this bug? has it been fixed?
Comment 7 Alex Fiestas 2009-08-29 01:44:33 UTC
No, it hasn't, I'll try to contact plasma developers now that they're in meeting maybe they'll have 1min to take a look.
Comment 8 Aaron J. Seigo 2009-08-29 02:33:30 UTC
SVN commit 1016829 by aseigo:

prevent duplicate actions in the toolbox
BUG:200981


 M  +8 -0      toolbox.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1016829
Comment 9 Aaron J. Seigo 2009-08-29 02:34:24 UTC
SVN commit 1016830 by aseigo:

prevent duplicate actions in the toolbox
CCBUG:200981


 M  +8 -0      toolbox.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1016830