开发者

How to link identical GTK::UIManager XML menus?

开发者 https://www.devze.com 2023-03-07 22:14 出处:网络
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?

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消