How to link identical GTK::UIManager XML menus?
My GTK application has the following UIManager XML. Is there a way to link those menus in the XML, so that I do not have to repeat myself?
<ui>
<menubar name="MenuBar">
<menu action="Options">
<menuitem action="Item0"/>
<menuitem action="Item1"/>
</menu>
&开发者_JAVA百科lt;/menubar>
<popup name="ContextMenu">
<menu action="Options">
<menuitem action="Item0"/>
<menuitem action="Item1"/>
</menu>
</popup>
</ui>
You can remove the repeated parts into a separate file, then use entities or XInclude to include them.
精彩评论