After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 735122 - GtkApplication: fix global menubar on Mac OS
GtkApplication: fix global menubar on Mac OS
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Class: GtkApplication
unspecified
Other All
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
: 744029 (view as bug list)
Depends on:
Blocks: 738874
 
 
Reported: 2014-08-20 20:07 UTC by Allison Karlitskaya (desrt)
Modified: 2015-02-06 10:53 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
quartz menu: update visibility property name (985 bytes, patch)
2014-08-20 20:07 UTC, Allison Karlitskaya (desrt)
committed Details | Review
GtkMenuTrackerItem: fix submenu visibility flag (1.28 KB, patch)
2014-08-20 20:07 UTC, Allison Karlitskaya (desrt)
committed Details | Review
GtkMenuTracker: one more visibility tweak (1.35 KB, patch)
2014-08-20 20:07 UTC, Allison Karlitskaya (desrt)
committed Details | Review

Description Allison Karlitskaya (desrt) 2014-08-20 20:07:38 UTC
Currently all items in the menubar are hidden.
Comment 1 Allison Karlitskaya (desrt) 2014-08-20 20:07:51 UTC
Created attachment 284002 [details] [review]
quartz menu: update visibility property name

This property is called "is-visible" now, not "visible".
Comment 2 Allison Karlitskaya (desrt) 2014-08-20 20:07:54 UTC
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.
Comment 3 Allison Karlitskaya (desrt) 2014-08-20 20:07:57 UTC
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().
Comment 4 Matthias Clasen 2014-08-21 02:02:56 UTC
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.
Comment 5 Matthias Clasen 2014-08-21 02:04:08 UTC
Review of attachment 284003 [details] [review]:

ok
Comment 6 Matthias Clasen 2014-08-21 02:06:42 UTC
Review of attachment 284004 [details] [review]:

action_removed also sets sensitive, toggled and role - do we not need those things here ?
Comment 7 jessevdk@gmail.com 2014-09-30 09:09:39 UTC
Ping! It's too bad this didn't get merged in time for 3.14...
Comment 8 Matthias Clasen 2014-10-01 23:17:27 UTC
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.
Comment 9 Allison Karlitskaya (desrt) 2014-10-21 15:57:23 UTC
In short: we need to drop all visibility handling from the quartz code.  This is handled in the tracker now by adding/removing items.
Comment 10 Matthias Clasen 2014-12-14 23:35:29 UTC
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
Comment 11 Matthias Clasen 2014-12-14 23:37:40 UTC
pushing this now anyway.
feel free to redo visibility handling when you get around to it, Ryan.
Comment 12 Allison Karlitskaya (desrt) 2015-02-06 10:53:04 UTC
*** Bug 744029 has been marked as a duplicate of this bug. ***