Commit Graph

8 Commits

Author SHA1 Message Date
David King
1e3e123c17 docs: Convert GtkMenuShell comment to documentation
https://bugzilla.gnome.org/show_bug.cgi?id=448637
2013-08-14 09:53:16 +01:00
Ryan Lortie
5617b58420 Introduce GtkMenuTracker
GtkMenuTracker folds a nested structure of sections in a GMenuModel into
a single linear menu, which it expresses to its user by means of 'insert
item at position' and 'remove item at position' callbacks.

The logic for where to insert separators and how to handle action
namespaces is contained within the tracker, removing the need to have
this logic duplicated in the 3 or 4 places that consume GMenuModel.

In comparison with the previous code, the tracker no longer completely
destroys and rebuilds menus every time a single change occurs.  As a
result, the new gtkmenu testcase now runs in approximately 3 seconds
instead of ~60 before.

https://bugzilla.gnome.org/show_bug.cgi?id=696468
2013-04-01 16:45:19 -04:00
Benjamin Otte
436af3fcb5 menu: Move enum declaration to correct header
That enum is used in GtkMenuShellClass, so put it there.
2013-03-28 23:18:58 +01:00
Javier Jardón
9d0febc9a6 Change FSF Address 2012-02-27 17:06:11 +00:00
Matthias Clasen
dd73be389b Fix commit 5f55c42047
Make gtk_menu_shell_activate static and don't use it
outside gtkmenushell.c
2011-04-17 23:15:06 -04:00
Benjamin Otte
e29cceb391 menushell: Include a function in the private header
Don't copy over the implementation. This avoids a copy of the function.
Reverts 0098344f84.
2011-04-16 22:28:40 +02:00
Matthias Clasen
5f55c42047 GtkMenuShell: always 'activate' menu shells
Failing to do so can leave us with a stuck grab in some cases.
https://bugzilla.gnome.org/show_bug.cgi?id=554057
2011-04-13 13:28:46 -04:00
Matthias Clasen
2ed81aa57c Remove sealed members from GtkMenuShell 2010-12-23 18:21:53 -05:00