Re: [Gtk-osx-users] menu synchronisation



On Apr 5, 2010, at 1:45 PM, Olivier Sessink wrote:

> 2010/4/5 Olivier Sessink <oliviersessink gmail com>:
>> One thing I noticed about the plugins: they all create their menu
>> items *after* ige_mac_menu_set_menu_bar() has been called. Could that
>> have an impact?
> 
> definitely related. I moved the set_menu_bar() to after the plugin gui
> code, and now everything shows up correctly. This code adds new main
> items to the menu bar, perhaps that is an issue?
> 
> b.t.w. the reason why I moved ige_mac_menu_set_menu_bar() to an
> earlier point in the code is that ige_mac_menu_sync() crashes if
> ..set_menu_bar() has not yet been called.
> 

No surprise about the crash. ige_mac_menu_sync should have "g_return_if_fail(carbon_menu != NULL);" for its second line. sync_menu_shell could stand to have some more error checks too.

I remember when I was getting Gnucash to work with this that I had some issues with getting the ige_mac_menu_sync calls in the right places. As you can see, once the menubar is in place, ige_mac_menu_set_menu_bar calls sync_menu_shell just like ige_mac_menu_sync, so it shouldn't matter which one you use; the important thing is to get the calls in the right places. As long as  you don't load plugins after first displaying the GUI, running ige_mac_menu_set_menu_bar at the last minute is easiest.

Regards,
John Ralls



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]