Jürgen Spitzmüller wrote: > Furthermore, it doesn't fix bug 2907: C-i still doesn't open the inset's > dialog. Do fix this (which also applies to url, nomenclature and others), > you'd need the change LFUN_NEXT_INSET_TOGGLE or LFUN_INSET_TOGGLE, > respectively. But then. you have to take care that all-insets-toggle > doesn't pop up the dialogs as well.
The attached patch would do this (probably it can be simplified a bit). Jürgen
Index: src/BufferView.cpp =================================================================== --- src/BufferView.cpp (Revision 20186) +++ src/BufferView.cpp (Arbeitskopie) @@ -1005,12 +1005,32 @@ // if there is an inset at cursor, see whether it // wants to toggle. Inset * inset = cur.nextInset(); - if (inset && inset->isActive()) { - Cursor tmpcur = cur; - tmpcur.pushLeft(*inset); - inset->dispatch(tmpcur, tmpcmd); - if (tmpcur.result().dispatched()) { - cur.dispatched(); + if (inset) { + if (inset->isActive()) { + Cursor tmpcur = cur; + tmpcur.pushLeft(*inset); + inset->dispatch(tmpcur, tmpcmd); + if (tmpcur.result().dispatched()) { + cur.dispatched(); + } + } else if (inset->lyxCode() == Inset::INDEX_CODE) { + InsetCommandMailer("index", + *reinterpret_cast<InsetCommand *>(inset)).showDialog(&cur.bv()); + } else if (inset->lyxCode() == Inset::URL_CODE) { + InsetCommandMailer("url", + *reinterpret_cast<InsetCommand *>(inset)).showDialog(&cur.bv()); + } else if (inset->lyxCode() == Inset::NOMENCL_CODE) { + InsetCommandMailer("nomenclature", + *reinterpret_cast<InsetCommand *>(inset)).showDialog(&cur.bv()); + } else if (inset->lyxCode() == Inset::LABEL_CODE) { + InsetCommandMailer("label", + *reinterpret_cast<InsetCommand *>(inset)).showDialog(&cur.bv()); + } else if (inset->lyxCode() == Inset::CITE_CODE) { + InsetCommandMailer("citation", + *reinterpret_cast<InsetCommand *>(inset)).showDialog(&cur.bv()); + } else if (inset->lyxCode() == Inset::REF_CODE) { + InsetCommandMailer("ref", + *reinterpret_cast<InsetCommand *>(inset)).showDialog(&cur.bv()); } } // if it did not work, try the underlying inset.