[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: Configure toolbar kills menu entries from plugins
From:       David Faure <faure () kde ! org>
Date:       2005-11-28 10:08:08
Message-ID: 200511281108.08746.faure () kde ! org
[Download RAW message or body]

On Saturday 26 November 2005 02:36, Andreas Silberstorff wrote:
> Am Freitag, 25. November 2005 20:52 schrieb David Faure:
> > On Friday 25 November 2005 00:56, Andreas Silberstorff wrote:
> > > Hi
> > > I still do not know how I can reload the plugins after configuring the
> > > toolbar. As KMainWindow does not throw any signals I took a look at
> > > KApplication. Here I found toolbarAppearenceChanged(int), so I conected
> > > that to my Slot reloadPlugins(int) but this is never called. Can someone
> > > give me a hint how I can achieve that the menuentries from my plugins
> > > survive the toolbar configuration?
> > 
> > From the kedittoolbar docu:
> > *   KEditToolbar dlg(actionCollection());
> > *  
> > connect(&dlg,SIGNAL(newToolbarConfig()),this,SLOT(slotNewToolbarConfig()));
> > 
> > and reload the plugins in slotNewToolbarConfig().
> Thank You, but that only got me back to where I started. Now I did overload 
> saveNewToolbarConfig(). I thought if I would call loadPlugins() or even 
> setupPlugins() after createGUI() like I do on startup I would get my menues 
> from the plugins back. But that does not function. I can only either not use 
> createGUI() and keep the menues and not show the changes in the toolbar 
> without restarting the application or use createGUI() and have the toolbar 
> change immediately and loose my files menu that contains the entries from my 
> plugins. Is that intentional or is there any way to have both?

Sounds to me like you're not integrating plugins into the GUI the right way.
What kind of plugins are they? Are you using KXMLGUIClient? With insertChildClient or \
with factory()->add? Are you passing false to createGUI in order to keep the qdom \
tree around?

You might want to try the second way of using kedittoolbar, i.e. KEditToolbar \
dlg(factory()) so that kedittoolbar can see the plugins. And then you don't need to \
call createGUI.

-- 
David Faure, faure@kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).

 
> > Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic