New function which implements "smart" separators by iterating once over
* gtk/gtkuimanager.c (update_smart_separators): New function which implements "smart" separators by iterating once over the entries of a menu, hiding and showing separators as necessary. (update_node): Mark separators used as fences of placeholders as hidden. Explicitly added separators are marked as smart. Call update_smart_separators after updating a menu or toolbar node. Connect update_smart_separators to "notify::visible" signal on menu and tool items. * tests/merge-[12].ui: Test smart separators. * gtk/tmpl/gtkuimanager.sgml: Add a paragraph about smart separators.
This commit is contained in:
@ -12,6 +12,7 @@
|
||||
<toolbar name="toolbar1">
|
||||
<placeholder name="ToolbarPlaceholder">
|
||||
<toolitem name="nb2" action="NewAction" />
|
||||
<separator name="Sep1" />
|
||||
</placeholder>
|
||||
<toolitem name="NewButton" action="NewAction" />
|
||||
<toolitem name="CutButton" action="CutAction" />
|
||||
|
||||
Reference in New Issue
Block a user