Mac Aqua: Submenus don't appear in global menu

Bug #538484 reported by Zachary Waldowski
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Inkscape
Invalid
Medium
Unassigned

Bug Description

I finally got a native Aqua/Quartz build of Inkscape running on Mac OS X 10.6 in full 64-bit! (Pro-tip: use an _entirely_ new MacPorts) Some small issues appear, but overall I'm very excited.

One major issue: submenus don't appear in the Mac OS global menu. This occurs in all menus in all situations, both in a build of Inkscape 0.47 and of 0.48 nightly (sometime last night, at about 9:00 PM EST). A comparison is attached below.

In an effort to fix, I also dropped in the latest IGE Mac Integration menu bindings into the 0.47 source and recompiled. No dice.

Perhaps code from GIMP can be used (http://git.gnome.org/browse/gimp/tree/app/gui/gui.c). It seems they use the ige-mac-menu stuff just like Inkscape, but submenus appear there.

As a last addition to the bug report, this being my first: I love Inkscape! I'm amazed by how functional and cool it is, and it is a killer app for me. I'm not even an artist (or really even of the creative type), and it is essential to the things that I do on my Mac.

Inkscape 0.48+devel r10105 (10.5.8 i386):
- no submenus
- no keyboard shortcuts displayed in the global menu

Tags: gtk-quartz osx ui
Revision history for this message
Zachary Waldowski (zwaldowski) wrote :
Revision history for this message
su_v (suv-lp) wrote :

same issue was reported for Tiger and earlier Leopard builds in bug #487427 “inkscape 0.47 aqua: menus do not display sub-menus”
<https://bugs.launchpad.net/inkscape/+bug/487427>

tags: added: gtk-osx osx ui
Changed in inkscape:
status: New → Confirmed
Revision history for this message
Zachary Waldowski (zwaldowski) wrote :

What could a plan of action be here? Could a newer upstream version of ige-mac-menu (from ige-mac-integration) be pulled in? Is the problem caused by the verb -> GTK Menu translation, or the orientation of menus as "widgets"?

Revision history for this message
su_v (suv-lp) wrote :

To my knowledge there is currently no developer actively working on this issue. It could be helpful if you document and share in detail what you tried so far (any patches you applied to dependencies and the inkscape sources, diffs of changes you made yourself, …) so that others who try to build Inkscape without dependencies to X11 (i.e. the so-called 'Aqua' version using GTK+/Quartz) can learn from your experiences.

Revision history for this message
Zachary Waldowski (zwaldowski) wrote :

Gladly.

First steps were to deactivate the special menu functions based around GDK_WINDOWING_QUARTZ in src/interface.cpp and src/widgets/desktop-widget.cpp so as to get a fully functional build.

Next step will be to replace (or incrementally patch) in an upstream(ier) version of ige-mac-menu (perhaps even some Cocoa functions). Once that all compiles without errors, I'll go back to adding in the Mac menu from scratch.

Revision history for this message
Wolf (drechsel) wrote :

IMHO there is a whole complex of the "ige-mac-integration" thing. Recently Krzysztof mailed that he's going to get involved into the whole thing. I'll notify him about this ticket.

Revision history for this message
Krzysztof Kosinski (tweenk) wrote :

I'm not sure I'm going to get involved in this, because I don't have access to an OSX machine. I thought I can run OSX in a virtual machine, but apparently this is very hard if at all possible.

Revision history for this message
Zachary Waldowski (zwaldowski) wrote :

 hate to pollute bug reports, but can't the latest Oracle VirtualBox run a virtual OS X? I'd also be glad to help debug.

Revision history for this message
su_v (suv-lp) wrote :

<http://monodevelop.com/Developers/Mac_Support> might contain some interesting pointers to bugs (and patches) related to GTK+/Quartz and ige-mac-integration.

Revision history for this message
Zachary Waldowski (zwaldowski) wrote :

I know this bug hasn't been updated in a while, and I'm afraid (due to school, etc) that I haven't been able to contribute to it as I planned, but I'm starting to kludge my way through things. The newest Git of ige-mac-integration as maintained by John Ralls (http://github.com/jralls/ige-mac-integration/commits/ardour-cocoa) include a variety of new Cocoa-based menu implementations that appear to be increasing in update frequency and feature-set, in particular worth mentioning menu item sync and submenu creation/destruction/sync. It is not yet feature complete, although the branch name indicates it is being used in the Ardour port which means that it'll probably come along quickly due its being used in a commercial product. This "newer" library includes many functions that resemble the menu manipulations (and therefore, could be triggered in similar ways) as they are in Inkscape. However, being Cocoa-based, these pull in Obj-C... which isn't all that good with my inability to manipulate the build system. Could they even be used in Inkscape?

I'm raring in "solution-mode" for this even though next week is exam week... I look forward to getting this stamped out, though!

Revision history for this message
macosxp (ariel18) wrote :

Any progress?

Revision history for this message
su_v (suv-lp) wrote :

Additionally, 'Filter' and 'Extensions' menus are empty besides the static entries.
(Inkscape 0.48+devel r10101 on Mac OS X 10.5.8 with gtk2 @2.22.1_1+no_x11+quartz)

Changed in inkscape:
importance: Undecided → Medium
status: Confirmed → Triaged
Revision history for this message
su_v (suv-lp) wrote :

Another example where submenus of the main menu (menubar) work just fine: Bluefish 2.0.3 [1]
(tested with official DMG [2] which - AFAICT - has been built and packaged using the latest gtk-osx (jhbuild) scripts [3]).

[1] <http://bluefish.openoffice.nl/>
[2] <http://www.bennewitz.com/bluefish/stable/binaries/macosx/>
[3] <http://bfwiki.tellefsen.net/index.php?title=Building_a_native_%28no_X11%29_MacOSX_binary>
    <http://bluefish.svn.sourceforge.net/viewvc/bluefish/tags/bluefish_2_0_3/macosx/>

Revision history for this message
su_v (suv-lp) wrote :

> First steps were to deactivate the special menu functions based
> around GDK_WINDOWING_QUARTZ in src/interface.cpp and
> src/widgets/desktop-widget.cpp so as to get a fully
> functional build.

Could you share more details or attach the diffs so that others can test with the same changes - without spending too much time with duplicate research about the details?

Revision history for this message
su_v (suv-lp) wrote :

Additionally, none of the keyboard shortcuts are added to the menu items in the menus from the main menubar (they are added e.g. in the context menu of the canvas though) - confirmed with r10505, gtk2 @2.22.1_1+no_x11+quartz.

description: updated
su_v (suv-lp)
description: updated
Revision history for this message
su_v (suv-lp) wrote :

~suv updated description:
> - - no static submenus
> - - no dynamic menu items (filters, extensions)
> + - no submenus

My bad! Extensions which are not placed into submenus are listed and executable (including live preview).

<off-topic>
closing a notification window reporting back stderr from the extension script however crashes inkscape with a similar backtrace as I get with bug #721448:

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_PROTECTION_FAILURE at address: 0x00000000
0x9254b81c in objc_msgSend_fpret ()
(gdb) bt
#0 0x9254b81c in objc_msgSend_fpret ()
#1 0x92dd9dcf in _DPSNextEvent ()
#2 0x92dd8f88 in -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] ()
#3 0x0246c457 in poll_func ()
#4 0x02f1742f in g_main_context_iterate ()
#5 0x02f17887 in g_main_loop_run ()
#6 0x017a7e71 in gtk_main ()
#7 0x011bdd4b in Gtk::Main::run ()
#8 0x0000532c in ~vector [inlined] () at stl_vector.h:986
#9 sp_main_gui (argc=1, argv=0xbffff1dc) at main.cpp:993
#10 0x00003f26 in start ()
(gdb) quit
</off-topic>

Revision history for this message
su_v (suv-lp) wrote :

Closing as 'Invalid' - the old integration code (src/ige-mac-menu.*) which didn't handle Inkscape's dynamic (sub-)menus in the global menubar has been completely removed in trunk (r10950) as well as the 0.48.x branch (r9867).

First attempts at using 'gtk-osx-application' from 'gtk-mac-integration' had full support for these types of (sub-)menus (see bug #721448 comment #15 and below for reports about initial tests).

Issues with (sub-)menus in future attempts at desktop integration should be filed and tracked separately.

Please add a comment and revert the status change if you think this report was closed in error.

Changed in inkscape:
status: Triaged → Invalid
su_v (suv-lp)
tags: added: gtk-quartz
removed: gtk-osx
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.