gtk/tests/merge-2.ui
Matthias Clasen 57f13d815d Test handling of empty menus.
2003-09-30  Matthias Clasen  <maclas@gmx.de>

	* tests/merge-*.ui:
	* tests/testmerge.c: Test handling of empty menus.

	* gtk/gtkuimanager.c (_gtk_menu_is_empty): New function to determine
	whether a menu is empty. Used in gtkaction.c.
	(update_smart_separators): Also update the visibility of empty menus.
	(update_node): When creating a new menu proxy, insert an "Empty" menu
	item which only gets shown if the menu is empty.

	* gtk/gtkaction.c (gtk_action_class_init): Document the meaning of
	"is_important" for menu proxies.
	(_gtk_action_sync_menu_visible): New function to sync the visibility
	of menu proxies. Used in gtkuimanager.c.
	(gtk_action_sync_visible): New function to sync the visibility of
	proxies.
2003-09-30 20:55:24 +00:00

36 lines
1.1 KiB
XML

<!--*- xml -*-->
<ui>
<menubar>
<menu name="FileMenu" action="FileMenuAction">
<menuitem name="New" action="NewAction" position="top" />
<separator name="Sep1" />
<separator name="Sep2" />
<menuitem name="Quit" action="QuitAction" />
<separator name="Sep3" />
</menu>
<menu name="EditMenu" action="EditMenuAction">
<menu name="EmptyMenu1" action="EmptyMenu1Action">
<menuitem name="Cut" action="CutAction" />
</menu>
<menu name="EmptyMenu2" action="EmptyMenu2Action">
<menuitem name="Cut" action="CutAction" />
</menu>
</menu>
<menu name="HelpMenu" action="HelpMenuAction">
<menuitem name="About" action="AboutAction" />
</menu>
</menubar>
<toolbar name="toolbar1">
<placeholder name="ToolbarPlaceholder">
<toolitem name="Quit" action="QuitAction" />
<separator name="Sep2"/>
</placeholder>
</toolbar>
<popup name="FileMenu" action="FileMenuAction">
<menuitem name="New" action="NewAction" position="top" />
<menu name="HelpMenu" action="HelpMenuAction">
<menuitem name="About" action="AboutAction" />
</menu>
</popup>
</ui>