kdevelop/kdevelop/lib

Simon Hausmann shaus at neuro2.med.uni-magdeburg.de
Fri Jun 23 21:29:14 UTC 2000



On Fri, 23 Jun 2000, Bernd Gehrmann wrote:

> > 
> > In environments like koffice or konqueror where you have multiple parts
> > and where it's important to deal with different activation/deactivation
> > states of parts, partmanager does a good job ;-) . However one can, as
> > stated above, use parts without a partmanager. (whereas use==embed, show
> > the gui, etc. ) .
> 
> Ah, that's what I was missing. But there is a problem: How do
> I add everything to the main window's gui factory? If I add
> the components before the main window itself, they open up
> strange top level items in the menu bar (well, not surprising...).
> If I add the main window followed by the components, all items
> get doubled, probably because the main window is added once again
> in createGUI(). To do it properly, there seems to be a hook missing
> just in the middle of createGUI() ;-)

I'm not sure I understand the problem :-)

Ahh, I see a guiFactory()->addClient( this ) call in the KDevelop
constructor. Replacing it with a createGUI( 0 ) call and getting rid of
the second createGUI( 0 ) call after initComponents() should make things
work (actually the second createGUI() call doesn't hurt -> it would do
nothing ) . The point is just that createGUI (even when called with
0L) takes care of building/adding the shell GUI (and doing that only
once) . (see KParts::MainWindow::createGUI implementation yourself ;-)

So the order would be: First the shell GUI (by the createGUI( 0 ) call),
followed by the GUIs of the "static" components, followed by dynamically
activated component GUIs (parts managed by a partmanager instance ) .

Bye,
 Simon






More information about the KDevelop-devel mailing list