in LyXFunc::Dispatch() there is a data member
string argument;
that is used in the switch(action) {
case LFUN_INSERT_CITATION:
{
InsetCitation * new_inset = new InsetCitation();
// ale970405
// The note, if any, must be after the key, delimited
// by a | so both key and remark can have spaces.
if (!argument.empty()) {
string lsarg(argument);
if (contains(lsarg, "|")) {
new_inset->setContents(token(lsarg, '|', 0));
new_inset->setOptions(token(lsarg, '|', 1));
} else
new_inset->setContents(lsarg);
if (!owner->view()->insertInset(new_inset))
delete new_inset;
} else {
if (owner->view()->insertInset(new_inset))
new_inset->Edit(owner->view(), 0, 0, 0);
else
delete new_inset;
}
}
break;
My question is simple:
is the use of argument relevant here, or has this piece of code been
superceeded by the new insets? If it is relevant, can someone please explain
where and when it would be used? I've removed it to see if I can find any
effect: NONE! Of course, my tests may be failing to trigger it.
If it is no longer relevant, the GUI-independent code becomes:
case LFUN_INSERT_CITATION:
{
owner->getDialogs()->showCitation(new InsetCitation());
}
break;
which then may or may not be inserted in the insetlist of insets, depending on
whether anything is actually entered in the citation dialog.
Angus