But I am not sure I like the introduction of LFUN_OUTLINER_CONTEXT; this is a GUI only thing and the core shouldn't have to know what's going on, only the TocWidget should know that a context menu was requested inside itself. For me, the separation line is simple, the only thing the core has to know about is what's going on in the current work area.

But maybe I don't really understand the issue here. Did you introduce this LFUN so that you can reuse the current menu infrastructure? I think (but I am not sure) that you should be able to use it without it. I guess this means that I disagree with JMarc ;-)

The issue here is that LyX needs to know who needs to process the dispatch-command. When e.g. a copy-label-as-reference command is dispatched, it can either be processed by BufferView and the InsetLabel at the cursor position, or by GuiView and the tocWidget.

As I already said in the answer to JMarc, I do not know how to decide which of the two to choose. Maybe we can look for which window the focus has (?), or use the getStatus mechanism to check whether the tocWidget displayed the context menu, or create new LFUNs especially for filling the context menu of the toc's, or use the new outliner-context command 'modifier'. If you have a good idea ... please let me know.


Abdel.

I agree that this looks more complicated, but I think that always using
the same path is in the end a gain. I agree that, with your patch, there
is no problem, because modifications are done through the dispatch
mechanism, but what I highlighted above (if not prohibitively
complicated) would make me happy :)
I believe the implementation is just like the way you propose..
JMarc

Any suggestions or opinions about the above ? I like my proposal, and I have (almost) no other ideas.

It would be nice if the context menus could be introduced and populated.

Vincent

Reply via email to