GNOME Bugzilla – Bug 682831
gtkmodelmenu: expose API for action namespace
Last modified: 2012-09-17 16:36:18 UTC
When a section (or submenu) item has a boolean property "with-separators", separators will be shown between items of that section (or submenu).
Created attachment 222588 [details] [review] gtkmodelmenu: add "with-separators" attribute
Created attachment 224028 [details] [review] gtkmodelmenu: simplify logic, expose namespace API Simplify some of the code for creating GtkMenu/GtkMenuBar instances from GMenuModel and expose the with-action-namespace variant of the API with a new name. Remove the private header file.
The patch has to be applied after the patch here: https://bugzilla.gnome.org/show_bug.cgi?id=683738#c1
Review of attachment 224028 [details] [review]: I'd like to see an example for how we expect all the new namespacing stuff to be used. Currently, it is a bit unmotivated.
Review of attachment 222588 [details] [review]: Docs ? Where do we document all these random new gmenu attributes ?
Created attachment 224242 [details] [review] gtkmodelmenu: simplify logic, expose bind API Make the main (and only) entry-point to gtkmodelmenu.c the now-public gtk_menu_shell_bind_model(). Move the convenience constructors (gtk_menu_new_from_model() and gtk_menu_bar_new_from_model()) to their proper files. Remove the private header file. Simplify the code a bit by making the initial populate part of the bind() call.
Review of attachment 224242 [details] [review]: Looks good, except for cosmetics. Feel free to commit with the fixes mentioned below. ::: gtk/gtk.symbols @@ -1609,3 @@ gtk_menu_popdown gtk_menu_popup gtk_menu_popup_for_device Missing gtk_menu_shell_bind_model here ::: gtk/gtkmenushell.h @@ +115,3 @@ + GMenuModel *model, + const gchar *action_namespace, + gboolean with_separators); Missing GDK_AVAILABLE_IN_3_6 here