]> Pileus Git - ~andy/gtk/commit
GtkModelMenuItem: add a submenu action attribute
authorRyan Lortie <desrt@desrt.ca>
Fri, 24 Aug 2012 18:11:37 +0000 (14:11 -0400)
committerRyan Lortie <desrt@desrt.ca>
Mon, 17 Sep 2012 16:31:21 +0000 (12:31 -0400)
commit338b5f6c2dc6cdb73ec3dfb6973b2269d4664b80
treeebde40d433cf55e01be7a5f46d4f5a4a3e9ac22d
parent9480e215062dc8d0319414bc96bab60e85b7f7a0
GtkModelMenuItem: add a submenu action attribute

Add support for a stateful action associated with a submenu.  The action
state is set to TRUE when the menu is shown and FALSE when it is
unshown.

This is useful to avoid unnecessary processing for menus that have
frequently-changing content.

A possible future feature is to add support for asynchronously filling
the initial state of the menu by waiting until the action actually emits
its state-change signal to TRUE before showing the menu.

A silly example has been added to Bloatpad to demonstrate the new
feature.

https://bugzilla.gnome.org/show_bug.cgi?id=682630
examples/bloatpad.c
gtk/gtkmodelmenuitem.c