Dynamic Menus -- Progress!

Subject: Dynamic Menus -- Progress!
From: Jared Davis (abiword@aiksaurus.com)
Date: Wed Sep 19 2001 - 18:51:42 CDT

File->Thesaurus is a reality.
Of course, that's not quite what we were after. =)

Joaquin, thanks for all your help! This is all coming together now. I'm
sorry it's taken me so long to do anything with it, I went out of town over
the weekend and was having all manner of problems getting abi to compile
today. (Thanks, Dom!)

Anyway, I tried to do it both ways,
        (1) through the EV_Menu->addPath() method and
        (2) by hand.

It ended up that route (1) did not work: it causes an assertation failure
pEM at ev_UnixGnomeMenu.cpp:95 because there is no
EV_EditMethodContainer defined for the option, and it doesn't like that
at all.

Route (2) I did get to work, but as mentioned earlier the "Thesaurus" item
gets added to the File menu. I have found out that the fault seems to be
that of the EV_Menu_Layout->addLayoutItem function.

My current function call looks like this:

        XAP_Menu_Id id = pLayout->addLayoutItem(

This seems to add the "Thesaurus" option as the very first option in the
menu. Changing the "1" to "4" moves it down further on the menu, and so on.
How do I get it to add to the Tools menu instead?

Aside from that, it looks and functions well. I've managed to get an
"underline" so you can now do <alt+f> to activate the "file" menu, then
press <t> to activate the thesaurus that way, so that's all working out
nicely, and the dialog does pop up correctly and seems to work fine.

My code is in cvs if anyone wants to look at it. (cvs co aiksaurus, cd

Other than that, I think I only have two more questions:
1. How do I add a <shift+f7> shortcut? <grin>
2. What all do I need to delete? In other words, I have made all these
function calls like pActionSet->addAction(new EV_Menu_Action(...)), are
these freed by EV_Menu_ActionSet or do I need to construct them outside
and delete them later?



This archive was generated by hypermail 2b25 : Wed Sep 19 2001 - 18:51:35 CDT