KDE/kdevplatform/shell

Andreas Pakulat apaku at gmx.de
Thu Jun 12 07:06:02 UTC 2008


On 12.06.08 01:23:07, Hamish Rodda wrote:
> SVN commit 819759 by rodda:
> 
> We must iterate all areas (including clones) to completely remove tool views.
> 
> This fixes the crash shortly after closing all projects, because without it some areas still have their reference to the now deleted view.
> 
> However, this reveals a new problem - when we open a new project, the project tool view is not automatically re-added, you have to add it via view->add tool view... shouldn't this be automatic?

I didn't look at the code yet (wanted to do it before somebody commits
this "fix", but you were faster as it seems), but I have the gut feeling
that this is actually an issue with how areas are implemented. 

Vladimir please correct me if I'm wrong, but Area's don't just "show"
toolviews anymore when they're added right? This is because we don't
want to clutter the Ui and this is good. But I guess there's no support
yet of keeping track wether there's at least one toolview open for a
given id, i.e. one project view open if the area's configuration
includes it.

Also do Area's have their configuration stored internally or are they
just initializing from and storing to the config file? i.e. does an area
always know which toolviews where there when it was created or not? I
think we need to know this, to properly fix the above. Lets say area
"code" is started with filesystem, documentview,classbrowser,konsole and
projectview. Then due to project unloading the projectview gets close
(toolview factory deleted). At this time the area should know that this
closing of a toolview wasn't "intentional" by the user but instead
automatically done by the code. So I think we need two different ways of
removing a toolview (at least two API methods), one which remembers this
and one which doesn't and then later on when adding a toolview via API
again the area can check wether this toolview is supposed to be there
and if yes it needs to be immediately shown.

I'll try to look into the code and propose a patch tonight, but I hope
its clear what I have in mind from the above: Basically area keeps a
list of toolviews that it started up with and only removes from this
list when the user closes all toolviews that belong to the same factory.
Not when the toolviews are removed by code itself. And then when adding
such a toolview again and its in its list of "started up with", then
automatically creates and shows that toolview, else behaves as
currently.

Andreas

-- 
Perfect day for scrubbing the floor and other exciting things.




More information about the KDevelop-devel mailing list