Thread Previous • Date Previous • Date Next • Thread Next |
Phil Weir wrote:
Yes, that worked, thanks! Now I can find other bugs... (Like the one where you've got a menu after the Help menu, which doesn't seem to be quite right). C.Good, good. Yes, the menu placement is a little odd. If you do work out how to fix that menu ordering let me know! The idea is that there are dynamic menus depending on which toplevel AObject you're viewing in the notebook (e.g. Glypher/Glancer/Glosser) but at the mo that simply updates the UI to add another menu and takes the last one off, or something along those lines. I think the meat of it is in aobject.py; the respective AObjects just set their self.ui_action_group, etc. members before calling their AObject.__init__(). See GlypherView.set_ui() [GlypherView.py:33] for an example. PForgot to CC the list. P
I think the trick is to use placeholders. I've uploaded something that seems to do the trick - the initial menu definition in bin/aesthete_ime adds a placeholder with the name "Dynamic". I modified the Glypher and Glancer menu definitions so that the menu now appears within this placeholder. I haven't tested this but it may even be possible to have multiple menus within the placeholder.
Let me know if you find any glitches with this implementation - the only other ways around this that I can see is to modify the merged menu with XML manipulation (which would be awful) or to have the help menu defined in all of the different notebook types (again not great).
C.
Thread Previous • Date Previous • Date Next • Thread Next |