KPart GUI merging

Andras Mantia amantia at freemail.hu
Mon Mar 31 12:50:21 BST 2003


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

Hi,

  I ask this also here, as it seems that nobody noticed or could help in on 
kde-devel. I'm using the Kate part as the editor inside Quanta. Until now I 
have not merged the part's XML GUI with the main applications UI, but I use 
my own slots connected to the menu actions, from where I call the 
coresponding KTextEditor method. The problem with this is that not everything 
is accessible via the KTextEditor interface (some are accessible via the Kate 
specific interface, but not everything). For example I cannot add any Code 
Folding related menu item, as there are no methods to control the code 
folding. This problem would disappear if I merge the Kate part UI into the 
main application (and I could also remove some code from Quanta). The problem 
with merging is that I would like to still use my own slots for some actions, 
which are also in the Kate part. Eg. I would like to control the 
enabled/disable status of some menu items, I would like to do something 
before/after the actual save of a document and so. For example take the 
"file_save" action. It's present in the katepartui.rc:
<Menu name="file" noMerge="1"><text>&File</text>
    <Action name="file_save" group="save_merge" />
    ...
</Menu>

If I put in the apps rc file:
    <Action name="file_save"  />
so I can connect a slot to it, I will have two Save menu items: mine and one 
at the end of the File menu.

The same will happen in case of 
    <Action name="file_save"  />
    <DefineGroup name="save_merge" />
In this case the second save will be right below the first one. 

If I use only the  <DefineGroup name="save_merge" />, I cannot connect my own 
slot to the file_save action. 

I took a quick look at the kxml* sources, and I see that it merges everything 
from the part ui with the main ui. 

So, let's summarize what I would like to have:

1. Control and use my own implementation of a slot connected to an action 
merged from the part ui (the rest of actions should be handled by the part 
itself)
2A. Mark somehow what should not be merged or
2B. Merge only what is inside <Merge> or <DefineGroup>

BTW, if I use Merge instead of DefineGroup, the group will be merged there, 
but will also appear at the end of the menu...

Is it possible now, or it needs to be implemented, and I'm stuck with the 
current implementation (no merging at all)?

Andras

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

iD8DBQE+iCt9TQdfac6L/08RAiMmAKDms3+rWeuWC7XJUXtepBXJhlpgMwCg5bND
YCA9pj6Rz3IC7wahj9wAmGI=
=sooG
-----END PGP SIGNATURE-----





More information about the kde-core-devel mailing list