>>>>> "John" == John Spray <[EMAIL PROTECTED]> writes:

John> Hi, One could easily make the gtk frontend crash with a failed
John> assertion in MenuBackend::Getmenu. The problem occurred when
John> viewing a document with figures in it: the "Figures" submenu
John> item didn't have a submenuname_ field, but
John> GMenubar::submenuDisabled always tries to get submenus by name
John> from the backend.

John> Attached patch fixes the crash for me, but since I don't fully
John> understand the menu system I'd appreciate if anyone could tell
John> me if it's dangerous/bad.

Hello John,

Sorry to take so long to answer. I took a look at the GMenuBar code,
and I think the problem is that you try to reimplement something that
is already done by MenuBackend :)

You should use MenuItem::status() to get the FuncStatus of a menu
entry. There is no need to go through the lyxfunc for that.

Also, this status() method returns the right value for a submenu too.
Therefore submenuDisabled is not needed at all.

Do this clear things up?

JMarc

Reply via email to