Icon choosing in kedittoolbar

Andras Mantia amantia at kde.org
Fri Apr 30 11:52:21 BST 2004


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

On Friday 30 April 2004 02:11, David Faure wrote:
> On Friday 30 April 2004 00:53, David Faure wrote:
> > Well you apparently need to fix much more than that, in particular
> > letting the normal xmlgui plugging mechanism do its work (you're
> > creating a real toolbar, so AFAICS it should work, if xmlguifactory
> > can find the action).
>
> Just to prove that it works indeed: proof-of-concept patch attached.
>
> Note the TODO, and note that you'll have to fix slotRemoveToolbar to
> fix the crash on exit :). And you can probably clean up a lot of
> slotConfigureToolbars().
>
> But the point is that it works fine that way, with no manual
> plugging, the toolbars appear and the edittoolbar dialog works as you
> expect.

Finally, I've managed to make it work. Aside of adding all actions from 
the mainwindow's actioncollection to the xmlgui's actioncollection, it 
is necessary to add all newly created actions to all xmlgui's 
actioncollections. So we saved some lines of code in createContainer 
and slotConfigureToolbars, but had to add more code in other places.
 The crash was even a stranger issue (I had to spend many hours starting 
at the code...) When I deleted an action, it was not removed from all 
actioncollections. First I had to use "take" from all of them and 
delete afterwards. I think this was done earlier, prior to insert/take 
was (temporary) deprecated.
 Now the only problem is that with the new way I have duplicate actions 
in the configure toolbars dialog if KDE < CVS HEAD is used, so I had to 
keep the old code for that case.

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)

iD8DBQFAki/lTQdfac6L/08RAuxNAJ92VCqwANQt67YbLJQjheGodt6ZFgCdHuCD
n4HCjE0ta2r7jZhLaUMzzNU=
=gjoS
-----END PGP SIGNATURE-----





More information about the kde-core-devel mailing list