GNOME Bugzilla – Bug 735122
GtkApplication: fix global menubar on Mac OS
Last modified: 2015-02-06 10:53:04 UTC
Currently all items in the menubar are hidden.
Created attachment 284002 [details] [review] quartz menu: update visibility property name This property is called "is-visible" now, not "visible".
Created attachment 284003 [details] [review] GtkMenuTrackerItem: fix submenu visibility flag We were only properly setting the "is-visible" flag to TRUE for menu items with associated actions and not (for example) on submenus. This was fine because the code for building GtkMenus from models (correctly) assumed that submenus should always be visible and never checked the property. This is not true for the Mac OS code, which actually checked the property and found it to be false for submenus. Initialise the property to TRUE so that we get the correct value reported for items that don't have actions.
Created attachment 284004 [details] [review] GtkMenuTracker: one more visibility tweak On creation, we call action_removed() in case the action was missing from the start. Because we just created the action, 'can_activate' will always be FALSE here and this function will therefore always do nothing. We do want the visibility state to be updated though, for the case where the action is missing but the item should still be visible from the start. Update the visibility directly instead of trying to call action_removed().
Review of attachment 284002 [details] [review]: Would be nice to refer in the commit message to the commit that changed things from visible to is-visible.
Review of attachment 284003 [details] [review]: ok
Review of attachment 284004 [details] [review]: action_removed also sets sensitive, toggled and role - do we not need those things here ?
Ping! It's too bad this didn't get merged in time for 3.14...
It didn't get merged because when I asked Ryan about these patches, he said to hold off and not apply them; he wanted to push alternative fixes. But he seems to be too busy with other stuff, so maybe we should go with these patches for 3.14.2 after all.
In short: we need to drop all visibility handling from the quartz code. This is handled in the tracker now by adding/removing items.
Attachment 284002 [details] pushed as 5c365b6 - quartz menu: update visibility property name Attachment 284003 [details] pushed as 8e73156 - GtkMenuTrackerItem: fix submenu visibility flag Attachment 284004 [details] pushed as 4288d7d - GtkMenuTracker: one more visibility tweak
pushing this now anyway. feel free to redo visibility handling when you get around to it, Ryan.
*** Bug 744029 has been marked as a duplicate of this bug. ***