Icon choosing in kedittoolbar

Andras Mantia amantia at kde.org
Thu Apr 29 15:12:54 BST 2004


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Thursday 29 April 2004 16:59, David Faure wrote:
> On Thursday 29 April 2004 13:53, Andras Mantia wrote:
> > Hi,
> >
> >  I have some problems with the last commits to KEditToolbar. Please
> > try to edit a DTD toolbar in Quanta (e.g Standard) either from the
> > Settings->Configure Toolbars or RMB->Edit Toolbar. All the actions
> > are missing from there, only the separators are visible. :-(
>
> kdeui (kdelibs): XmlData type Part xmlFile:
> /tmp/kde-dfaure3SWjsS/quanta/quanta4G99la.tmp kdeui (kdelibs):    
> Toolbar: Standard <quanta>
> kdeui (kdelibs):     0 actions in the collection.
>
> Your actions are not in the part's actioncollection ???
> How does this xmlguiclient's actions get plugged into place then?

This is how they are created (in quanta.cpp, 
QuantaApp::slotLoadToolbarFile(const KURL& url)):
    if (! actionCollection()->action(actionName))
    {
      TagAction *tagAction = new TagAction(&el, actionCollection() );
	...
    } 

where el is a QDomElement, the call is in the class inheriting from 
KMainWindow or more exactly KParts::DockMainWindow.

Later:
TagAction::TagAction( QDomElement *element, KActionCollection *parent)
  : KAction( element->attribute("text").isEmpty() ? QString("") : 
i18n(element->attribute("text").utf8()), 
KShortcut(element->attribute("shortcut")), 0, 0, parent, 
element->attribute("name") )

so the action should be added to the actioncollection.

And this worked before (I believe we have the code since KDE 3.1.x, 
maybe even from earlier).

Andras


- -- 
Quanta Plus developer - http://quanta.sourceforge.net
K Desktop Environment - http://www.kde.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)

iD8DBQFAkQ1mTQdfac6L/08RAh2iAKCvOhaFGKS5Lw0fXDScG7A32AJFrgCgzhJh
2Ed5SCWbG2xd6ugXuWC/ios=
=u9df
-----END PGP SIGNATURE-----




More information about the kde-core-devel mailing list