Icon choosing in kedittoolbar

Andras Mantia amantia at kde.org
Thu Apr 29 22:06:43 BST 2004


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

On Thursday 29 April 2004 23:20, David Faure wrote:
> On Thursday 29 April 2004 22:03, Andras Mantia wrote:
> > Isn't factory()->addClient() an xmlgui way to add them?
>
> Yes it is. But that's not what I'm talking about. See the
> action->plug() call in the code! The addClient call does nothing,
> since the action collection of the client is empty.
>
> > The reason why I
> > do it like you saw is because this was the only way I could get it
> > work (don't ask me the exact problems, as I coded almost 2 years
> > ago).
>
> Well I think the exact problem is the wrong actioncollection as
> parent.

I think I start to understand what is the problem. In our case the GUI 
(the toolbar itself) is separated from the actions. The actions are put 
in the global, mainwindow's actioncollection. And this is what we 
desire. I don't want to limit what action goes to a toolbar. You should 
be able put every action of the main application to such a toolbar and 
every action loaded together with a toolbar may go to (let's say) the 
main toolbar. This implies that the action should be part of the 
mainwindow's actioncollection. But as currently KEditToolbar looks for 
the actions present only in the xmlguiclient, it won't show anything. 
Adding them to the xmlguiclient's actionCollection would not solve the 
problem, as in the left listview I would not see all the actions from 
all the loaded toolbars and the standard mainwindow actions.

This is what you've committed:
- -    // iterate through all of our actions
- -    for (unsigned int i = 0;  i < d->m_actionList.count(); i++)
+    // iterate through this client's actions
+    // This used to iterate through _all_ actions, but we don't support
+    // putting any action into any client...

And yes, I think this is what we need: putting any action into any 
client.

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)

iD8DBQFAkW5kTQdfac6L/08RAlhoAKCCPyRx2HIlCjtzoR+mjehsOoBeOwCfRHzv
TC9OS1yURHOPYXG1fPhmLfw=
=OW1S
-----END PGP SIGNATURE-----




More information about the kde-core-devel mailing list