Re: [Libegg] Versioning of UI files
- From: Michael Tindal <etherscape paradoxpoint com>
- To: Owen Taylor <otaylor redhat com>
- Cc: biswapesh_chatterjee tcscal co in, GTK Devel <gtk-devel-list gnome org>
- Subject: Re: [Libegg] Versioning of UI files
- Date: 23 Apr 2003 11:08:16 -0400
On Wed, 2003-04-23 at 10:34, Owen Taylor wrote:
> On Wed, 2003-04-23 at 06:14, Biswapesh Chattopadhyay wrote:
>
> > And, here' an example UI file for libegg menu:
> > ------------------------------------
> > <!--*- xml -*-->
> > <Root>
> > <menu>
> > <submenu name="FileMenu" verb="StockFileMenuAction">
> > <menuitem name="New" verb="NewAction" pos="top" />
> > <separator />
> > <menuitem name="Quit" verb="QuitAction" />
> > </submenu>
> > </menu>
> > <dockitem name="toolbar1">
> > <placeholder name="ToolbarPlaceholder">
> > <toolitem name="Quit" verb="QuitAction" />
> > <separator />
> > </placeholder>
> > </dockitem>
> > </Root>
> > --------------------------------------------------
> >
> > IMO, it makes sense to do away with the '<Root>' element and replace it
> > one or more '<gtkui name="name" version="version">. This will have two
> > uses:
> >
> > 1. Check and verify name while loading/unloading like we have in
> > libglade. Also, store multiple UI groups in a single file and load one
> > or more depending on the name.
> > 2. Having a version number will help in storing customized layouts, i.e.
> > the customized layout will store the version number, and if the version
> > number of the core layout changes, the customized layout becomes invalid
> > and won't be loaded. This will help with widgets like ToolbarEditor and
> > menu/action customization.
>
> No real comment on the proposal, but not that a properly formed XML
> file must have exactly one root node.
>
> Regards,
> Owen
Like Owen said, a well-formed XML file must have one and exactly one
root element. So you can either replace Root with _one_ gtkui element,
but not one or more. IMHO I think perhaps you might instead want to
look at something like:
<Root>
<gtkui name="name" version="version">
<!-- the stuff that is currently under Root -->
</gtkui>
<!-- Repeat more gtkui elements as needed -->
</Root>
I do this in a lot of the XML-based things I write, with one overall
root element, and then elements underneath root that in their own file
might be considered the root element.
Mike
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]