case LFUN_DIALOG_SHOW_NEW_INSET:
if (cmd.argument() == "bibitem")
code = BIBITEM_CODE;
- else if (cmd.argument() == "bibtex")
+ else if (cmd.argument() == "bibtex") {
code = BIBTEX_CODE;
+ // not allowed in description items
+ enable = !inDescriptionItem(cur);
+ }
else if (cmd.argument() == "box")
code = BOX_CODE;
else if (cmd.argument() == "branch")
break;
case LFUN_FLOAT_LIST_INSERT:
code = FLOAT_LIST_CODE;
+ // not allowed in description items
+ enable = !inDescriptionItem(cur);
break;
case LFUN_CAPTION_INSERT:
code = CAPTION_CODE;
break;
case LFUN_INDEX_PRINT:
code = INDEX_PRINT_CODE;
+ // not allowed in description items
+ enable = !inDescriptionItem(cur);
break;
case LFUN_NOMENCL_INSERT:
if (cur.selIsMultiCell() || cur.selIsMultiLine()) {
break;
case LFUN_NOMENCL_PRINT:
code = NOMENCL_PRINT_CODE;
+ // not allowed in description items
+ enable = !inDescriptionItem(cur);
break;
case LFUN_TOC_INSERT:
code = TOC_CODE;
+ // not allowed in description items
+ enable = !inDescriptionItem(cur);
break;
case LFUN_HYPERLINK_INSERT:
if (cur.selIsMultiCell() || cur.selIsMultiLine()) {