GNOME Bugzilla – Bug 691921
GTK+ (quartz) built on Mac OS X 10.5 references [NSMenu removeAllItems]
Last modified: 2013-05-20 22:21:09 UTC
Everythig builds fine, but application (transmission-gtk) immediately crashes with an undefined reference to [GNSMenu removeAllItems]: 2013-01-16 21:14:08.009 transmission-gtk[49811:807] *** -[GNSMenu removeAllItems]: unrecognized selector sent to instance 0x143b560 Class reference for NSMenu shows removeAllItems was added in Mac OS X v10.6. Tested GTK+ versions 3.6.2 and 3.6.4 built as Macports package on Mac OS X 10.5 PowerPC. NSMenu removeAllItems reference: http://developer.apple.com/library/mac/documentation/cocoa/reference/ApplicationKit/Classes/NSMenu_Class/Reference/Reference.html#//apple_ref/occ/instm/NSMenu/removeAllItems
You might not want to hear this, but IMO we should simply drop support for 10.5 anyway.
I can see dropping 10.4, but there are still a fair number of PPC macs out there, and they're stuck at 10.5.
Created attachment 243254 [details] [review] Uses removeItemAtIndex if removeAllItems isn't available. There aren't any tests for the model-menu stuff AFAICT. Can you check to see if this works in your program?
The patch to gtk/gtkmodelmenu-quartz.c solves the problem. However, I've upgraded to GTK+ 3.8.1 since reporting, and the patch to gdk/quartz/gdkdisplay-quartz.c fails. The referenced chunk doesn't appear in the file.
Sorry, the gdkdisplay-quartz change is git-leakage. It's not part of this bug.
Comment on attachment 243254 [details] [review] Uses removeItemAtIndex if removeAllItems isn't available. And backported to 3.8