Angus Leeming wrote: > [EMAIL PROTECTED] wrote: >> I see. But show is called when inserting the label inset: >> >> 1523 case LFUN_INSERT_LABEL: { >> 1524 doInsertInset(this, cmd, true, false); >> 1525 InsetCommandParams p("label"); >> 1526 string const data = >> InsetCommandMailer::params2string("label", p); >> 1527 bv->owner()->getDialogs().show("label", data, 0); >> 1528 break; >> 1529 } >> >> Ah... should I put statement 1524 after 1527? > > No, you should simply remove 1524.
However, if the user invokes LFUN_INSERT_LABEL with the contents already there, then you shouldn't lauch the dialog at all but rather you should just create the inset with these data. The analogous code in the 13x series is this: case LFUN_CITATION_CREATE: { InsetCommandParams p("cite"); if (!argument.empty()) { // This should be set at source, ie when typing // "citation-insert foo" in the minibuffer. // Question: would pybibliographer also need to be // changed. Suspect so. Leave as-is therefore. if (contains(argument, "|")) { p.setContents(token(argument, '|', 0)); p.setOptions(token(argument, '|', 1)); } else { p.setContents(argument); } dispatch(FuncRequest(view(), LFUN_CITATION_INSERT, p.getAsString())); } else owner->getDialogs().createCitation(p.getAsString()); } break; I'm afraid I don't have the 14x sources to hand and searching viewcvs is a pain. However, I'd hope that I retained this capability. Unfortunately, I can no longer remember the name of the generic LFUN_INSET_FOOBAR, now invoked as LFUN_INSET_FOOBAR "citation"... -- Angus