On Tue, May 14, 2013 at 8:54 AM, Jacob Peck <[email protected]> wrote:
> I'm still fairly lost as to how to actually add things to the existing
menubar... how do I get at the leoQtMenu instance? Or do I create a new
one? I could manipulate c.frame.top.menuBar directly, I suppose, but that's
not what I want to do - it goes against the API you just showed me.
Excellent question. You understand the issues completely.
It's ok with me if you do just use c.frame.top.menuBar directly. It would
make your plugin Qt specific, but that's a minor point.
To get a particular menu, use the getMenu command in leoMenu.py: Here it
is::
def getMenu (self,menuName):
cmn = self.canonicalizeMenuName(menuName)
return self.menus.get(cmn)
The call to canonicalizeMenuName means that you don't have to worry about
capitalization or other cruft (like ampersands) in the menu name you pass
as menuName.
EKR
--
You received this message because you are subscribed to the Google Groups
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/leo-editor?hl=en-US.
For more options, visit https://groups.google.com/groups/opt_out.