>>>>> "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes:
Angus> I am happily removing stuff like: case LFUN_REF_INSERT: code = Angus> Inset::REF_CODE; break; Angus> Should I replace it with something like: case Angus> LFUN_DIALOG_SHOW_NEW_INSET: if (ev.argument == "citation") code Angus> = Inset::CITE_CODE; else if (ev.argument == "ref") code = Angus> Inset::REF_CODE; break; Yes, something like this, although this is clearly ugly. Angus> What does the function do? The idea is to be able to say whether it is legal to use LFUN_DIALOG_SHOW_NEW_INSET at some place. Therefore we need the relevant Inset::Code in order to call insetAllowed(code). So we want to get the code of the new inset from the name of the lfun (now the argument of the lfun). This is very probably something that can/should be done in the inset factory (which should have this info) or somewhere else. Is this clear? JMarc