[Uml-devel] u2 gui design
Carsten Pfeiffer
carpdjih at mailbox.tu-berlin.de
Wed Apr 23 17:01:40 UTC 2003
-----BEGIN PGP SIGNED MESSAGE-----
[grmbl, again forgot to change the To-line -- why isn't this set to
uml-devel at lists.sf.net by default?]
On Thursday 24 April 2003 00:31, Sebastian Stein wrote:
> It is very easy, but, and now I hope someone can step in, I don't know how
> to handle dynamic menus.
>
> I mean we have a central XML file for the menu structure. And yes, if the
> user likes he can edit this file to customize the menu structure. But that
> is not what we want. We want a plugin to change the menu structure, add an
> entry when the plugin gets loaded, remove an entry when the plugin gets
> removed.
> The question is hoow do I update the XML file? I think it would be not the
> right solution to parse the XML file, insert the plugin specific stuff,
> save it back (maybe to /tmp) and call the gui builder function again.
> So, the problem are plugins which we don't know during Umbrello's
> compilation. The plugin should decide where to plug into the menu, toolbar.
> It is not Umbrellos task.
You don't need to change the XML file at all. The XML merging happens at
runtime in memory with help of the KXMLGUIClient and KXMLGUIFactory classes.
This is exactly what KPart Plugins do for example. See all those Konqueror
plugins in kdeaddons? They all provide a small XMLGUI (*.rc) file with the
location of where their actions are supposed to be merged into the GUI.
Cheers
Carsten Pfeiffer
-----BEGIN PGP SIGNATURE-----
iQEVAwUBPqco8qWgYMJuwmZtAQE4dgf/dTTdeQDJPPq6pF9Sa/JSTF+4pfDU4xm4
/N/ugzKhMJjJnCTqVDhoBc2FeCxIAYYswwDCI1WwL6danrKRuz2fU0l5NxNkf3do
TUceQzHQcCaCgfQZd7mcmreVOFYpiyKypE0+zKEe7do9Naz4WnmQGh/QySTBZNhF
D6NznTnLa38bjrVGEuWduJG5IyT35gflnBfQlaeKcFeP7wPATbBOPRzy7cdX6pBV
XZJlZTn3zgvFp8b15uCXc5ZK39CFYZyqs8C8XwIB2hClb7QKT10VS7GGrmUqRBBj
koZxa0bfwntBMCjY6X14W3pu937iZ7xNXxfx84Rgw7nSZ0R7OsmwSw==
=LtO6
-----END PGP SIGNATURE-----
More information about the umbrello-devel
mailing list