[Libegg] Versioning of UI files



Here's an example of a RC file for a KPart:
-------------------------------------
<!DOCTYPE kpartgui SYSTEM "kpartgui.dtd">
<kpartgui name="KDevAbbrevPart" version="1">
<MenuBar>
  <Menu name="edit" >
    <Action name="edit_expandtext"/>
    <Action name="edit_expandabbrev"/>
  </Menu>
</MenuBar>
</kpartgui>
-------------------------------------

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.

Thanks and regards,
Biswa.

****** Message from InterScan E-Mail VirusWall NT ******

** No virus found in attached file edit_expandabbrev

NO VIRUS FOUND: SERVER GENERATED MESSAGE
*****************     End of message     ***************



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]