Jean-Marc Lasgouttes schreef:
1. If an LFUN_INSET_TOGGLE is send to an InsetCommand, the settings
dialog is shown. Wouldn't it make more sense to dispatch an
LFUN_INSET_SETTINGS instead ?
Actually, I would remove this possibility for inset-toggle to open a
dialog, and find a convenient shortcut for inset-setting instead.
The current behaviour is a bit strange to me.
Command-alternative inset-toggle; inset-settings ?
2. the status of LFUN_INSET_SETTINGS is handled by
BufferView::getStatus() and the dispatch is handled by
Text::dispatch(). This looks at least a bit awkward. Shouldn't these
be handled by the same class ?
Why not all of them in the relevant inset class?
Because inset-settings (and inset-toggle) now first have to decide to
which Inset they dispatch (which might be done with the AtPoint flag).
When point 3 is fixed, we are halfway..
3. when Text::dispatch() handles the LFUN_INSET_SETTINGS, it resolves
the inset of interest and calls inset.showInsetDialog(). Should this
not be handled by the Inset. Thus Text::dispatch calls
Inset::dispatch which then calls showInsetDialog. In this way you can
dispatch the LFUN_INSET_SETTINGS to an Inset (which seems like a good
thing to do) without running into an assertion.
Definitely. You may want to experiment with the new AtPoint LyXAction
flag.
Yes, definitely.
JMarc
Vincent