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 741610 - Finish up support for macos menubar
Finish up support for macos menubar
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Class: GtkApplication
unspecified
Other All
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks: 741904
 
 
Reported: 2014-12-16 17:38 UTC by Allison Karlitskaya (desrt)
Modified: 2014-12-23 13:03 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
GtkMenuTracker: add missing documentation fragment (995 bytes, patch)
2014-12-16 17:39 UTC, Allison Karlitskaya (desrt)
committed Details | Review
GtkMenuTracker: add hidden-when='macos-menubar' (14.35 KB, patch)
2014-12-16 17:39 UTC, Allison Karlitskaya (desrt)
committed Details | Review
Use the OSX menubar layout for XFCE, Unity, etc. (28.37 KB, patch)
2014-12-16 18:18 UTC, Allison Karlitskaya (desrt)
reviewed Details | Review

Description Allison Karlitskaya (desrt) 2014-12-16 17:38:56 UTC
This is the "0.1" part of the promised future where each app would only need
2.1 menus.  This adds support for hiding a few select items on Mac OS in order
to avoid having to create a completely separate menu structure there.
Comment 1 Allison Karlitskaya (desrt) 2014-12-16 17:39:01 UTC
Created attachment 292852 [details] [review]
GtkMenuTracker: add missing documentation fragment
Comment 2 Allison Karlitskaya (desrt) 2014-12-16 17:39:17 UTC
Created attachment 292853 [details] [review]
GtkMenuTracker: add hidden-when='macos-menubar'

Provide a mechanism for hiding the "Quit", "About" and "Preferences"
menu items from the normal places in a traditional menubar layout (in
the File and Edit menus) when the menu is being rendered in the Mac OS
menubar.

These items can already be found in the application menu.

With this feature, applications can now define a single menu to use in
all 'traditional' scenarios.

Use this new attribute in Bloatpad.
Comment 3 Allison Karlitskaya (desrt) 2014-12-16 18:18:43 UTC
Created attachment 292855 [details] [review]
Use the OSX menubar layout for XFCE, Unity, etc.

Experimental patch to show what hidden-when='macos-menubar' means for gedit.
Comment 4 Matthias Clasen 2014-12-17 00:41:16 UTC
Review of attachment 292852 [details] [review]:

Sure
Comment 5 Matthias Clasen 2014-12-17 00:47:00 UTC
Review of attachment 292853 [details] [review]:

gboolean mac_os_mode
is not the most inspired api choice. But as long as it's just internal, maybe good enough
Comment 6 Matthias Clasen 2014-12-17 00:51:12 UTC
Review of attachment 292855 [details] [review]:

Here it goes from uninspired to actively misleading.
if you want this used 'everywhere not gnome', it should not be called macos
Comment 7 Allison Karlitskaya (desrt) 2014-12-17 01:22:49 UTC
Review of attachment 292855 [details] [review]:

This was just a quick hack to give the gedit developers an idea of the direction to go in.  It's not complete.  Perhaps the commit message could use a bit of clarification.

The intention is that you add "hidden-when=macos" to your traditional menubar file which gets used everywhere there is no app menu.

This field means absolutely nothing unless mac_os_mode is TRUE, and that's only ever TRUE on macos.  Even on macos, it's only true while populating the top menubar, so it wouldn't even apply to popovers rendered on macos, for example.
Comment 8 Allison Karlitskaya (desrt) 2014-12-17 01:24:35 UTC
Review of attachment 292853 [details] [review]:

I considered folding the (now) 3 booleans into a flags field but I didn't bother with that precisely because this is only internal API.

I also considered just using an #ifdef on Mac OS but I don't want to apply this in cases where we are:

 a) using the X11 backend and rendering a normal menubar inside of an X window

 b) popovers and so on

So basically this field is the "are we rendering the macos menubar" field (as explained in the docs " @mac_os_mode: if this is on behalf of the Mac OS menubar ").
Comment 9 Matthias Clasen 2014-12-17 11:41:06 UTC
Comment on attachment 292853 [details] [review]
GtkMenuTracker: add hidden-when='macos-menubar'

ok then
Comment 10 Allison Karlitskaya (desrt) 2014-12-21 02:24:58 UTC
Comment on attachment 292852 [details] [review]
GtkMenuTracker: add missing documentation fragment

Attachment 292852 [details] pushed as ef2c684 - GtkMenuTracker: add missing documentation fragment
Comment 11 Matthias Clasen 2014-12-22 11:23:12 UTC
Attachment 292853 [details] pushed as 6b26664 - GtkMenuTracker: add hidden-when='macos-menubar'