diff --git a/lib/ChangeLog b/lib/ChangeLog index 0248bdd9f0..375f2d80b5 100644 --- a/lib/ChangeLog +++ b/lib/ChangeLog @@ -1,3 +1,7 @@ +2003-02-21 Angus Leeming + + * ui/default.ui: change bibkey-insert to bibtem-insert. + 2003-02-18 Juergen Spitzmueller * layouts/scrclass.inc: diff --git a/lib/ui/default.ui b/lib/ui/default.ui index 35c4e0ac70..aa2a363952 100644 --- a/lib/ui/default.ui +++ b/lib/ui/default.ui @@ -201,7 +201,7 @@ Menuset Item "Footnote|F" "footnote-insert" Item "Marginal Note|M" "marginalnote-insert" Item "Short Title" "optional-insert" - Item "Bibliography Key" "bibkey-insert" + Item "Bibliography Key" "bibitem-insert" Item "Index Entry...|I" "index-insert" Item "URL...|U" "url-insert" Item "Note|N" "note-insert" diff --git a/src/BufferView_pimpl.C b/src/BufferView_pimpl.C index 34b5a478e3..b974d55d47 100644 --- a/src/BufferView_pimpl.C +++ b/src/BufferView_pimpl.C @@ -40,17 +40,17 @@ #include "iterators.h" #include "lyxfind.h" -#include "insets/insetbib.h" -#include "insets/insettext.h" -#include "insets/insetlatexaccent.h" -#include "insets/insettoc.h" -#include "insets/insetindex.h" -#include "insets/insetref.h" -#include "insets/insetinclude.h" +#include "insets/insetbibtex.h" #include "insets/insetcite.h" -#include "insets/insetgraphics.h" -#include "insets/insetmarginal.h" #include "insets/insetfloatlist.h" +#include "insets/insetgraphics.h" +#include "insets/insetinclude.h" +#include "insets/insetindex.h" +#include "insets/insetlatexaccent.h" +#include "insets/insetmarginal.h" +#include "insets/insetref.h" +#include "insets/insettext.h" +#include "insets/insettoc.h" #include "mathed/formulabase.h" diff --git a/src/ChangeLog b/src/ChangeLog index e4774b9346..954c50d7d7 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,22 @@ +2003-02-21 Angus Leeming + + * BufferView_pimpl.C: replace insetbib.h with insetbibtex.h. + * LyXAction.C: change, BIBKEY to BIBITEM. + * buffer.C: replace insetbib.h with insetbibitem.h and insetbibtex.h. + Change InsetBibKey to InsetBibitem. + Change BIBKEY_CODE to BIBITEM_CODE. + * commandtags.h: change LFUN_INSERT_BIBKEY to LFUN_INSERT_BIBITEM. + * factory.C: replace insetbib.h with insetbibitem.h. + Change LFUN_INSERT_BIBKEY to LFUN_INSERT_BIBITEM. + * paragraph.C: replace insetbib.h with insetbibitem.h. + * paragraph.[Ch]: change InsetBibKey to InsetBibitem. + Change bibkey() to bibitem(). + * text.C: remove insetbib.h. + * text2.C: replace insetbib.h with insetbibitem.h. + change bibkey() to bibitem(). + * text3.C: remove insetbib.h. + change LFUN_INSERT_BIBKEY to LFUN_INSERT_BIBITEM. + 2003-02-18 Jean-Marc Lasgouttes * lyxrc.C (output): enclose user email in quotes (in case there are diff --git a/src/LyXAction.C b/src/LyXAction.C index 47b279a57e..a1dca28948 100644 --- a/src/LyXAction.C +++ b/src/LyXAction.C @@ -245,7 +245,7 @@ void LyXAction::init() Noop }, { LFUN_INSET_OPTARG, "optional-insert", N_("Insert Optional Argument"), Noop }, - { LFUN_INSERT_BIBKEY, "bibkey-insert", N_("Insert Bibliography Key"), + { LFUN_INSERT_BIBITEM, "bibitem-insert", N_("Insert Bibliography Key"), Noop }, { LFUN_LANGUAGE, "language", N_("Change language"), Noop }, { LFUN_LATEX_LOG, "latex-view-log", N_("View LaTeX log"), diff --git a/src/buffer.C b/src/buffer.C index 06ae1d8380..24f0dbaa44 100644 --- a/src/buffer.C +++ b/src/buffer.C @@ -55,7 +55,8 @@ #include "insets/insetnote.h" #include "insets/insetquotes.h" #include "insets/insetlatexaccent.h" -#include "insets/insetbib.h" +#include "insets/insetbibitem.h" +#include "insets/insetbibtex.h" #include "insets/insetcite.h" #include "insets/insetexternal.h" #include "insets/insetindex.h" @@ -958,7 +959,7 @@ Buffer::parseSingleLyXformat2Token(LyXLex & lex, Paragraph *& par, ++pos; } else if (token == "\\bibitem") { // ale970302 InsetCommandParams p("bibitem", "dummy"); - InsetBibKey * inset = new InsetBibKey(p); + InsetBibitem * inset = new InsetBibitem(p); inset->read(this, lex); par->insertInset(pos, inset, font, current_change); ++pos; @@ -1099,7 +1100,7 @@ void Buffer::readInset(LyXLex & lex, Paragraph *& par, inset = new InsetCitation(inscmd); } else if (cmdName == "bibitem") { lex.printError("Wrong place for bibitem"); - inset = new InsetBibKey(inscmd); + inset = new InsetBibitem(inscmd); } else if (cmdName == "BibTeX") { inset = new InsetBibtex(inscmd); } else if (cmdName == "index") { @@ -2890,8 +2891,8 @@ void Buffer::fillWithBibKeys(vector > & keys) const static_cast(*it).fillWithBibKeys(this, keys); else if (it->lyxCode() == Inset::INCLUDE_CODE) static_cast(*it).fillWithBibKeys(keys); - else if (it->lyxCode() == Inset::BIBKEY_CODE) { - InsetBibKey & bib = static_cast(*it); + else if (it->lyxCode() == Inset::BIBITEM_CODE) { + InsetBibitem & bib = static_cast(*it); string const key = bib.getContents(); string const opt = bib.getOptions(); string const ref; // = pit->asString(this, false); diff --git a/src/commandtags.h b/src/commandtags.h index 7ccc3ac889..1216e494d3 100644 --- a/src/commandtags.h +++ b/src/commandtags.h @@ -296,7 +296,7 @@ enum kb_action { LFUN_REJECT_CHANGE, // Levon 20021016 LFUN_ACCEPT_ALL_CHANGES, // Levon 20021016 LFUN_REJECT_ALL_CHANGES, // Levon 20021016 - LFUN_INSERT_BIBKEY, // André 14 Feb 2003 + LFUN_INSERT_BIBITEM, // André 14 Feb 2003 LFUN_LASTACTION /* this marks the end of the table */ }; diff --git a/src/factory.C b/src/factory.C index 601f72684c..8e032cf51f 100644 --- a/src/factory.C +++ b/src/factory.C @@ -18,7 +18,7 @@ #include "BufferView.h" #include "lyxtext.h" -#include "insets/insetbib.h" +#include "insets/insetbibitem.h" #include "insets/insetcaption.h" #include "insets/insetert.h" #include "insets/insetexternal.h" @@ -71,8 +71,8 @@ Inset * createInset(FuncRequest const & cmd) case LFUN_INSET_OPTARG: return new InsetOptArg(params); - case LFUN_INSERT_BIBKEY: - return new InsetBibKey(InsetCommandParams("bibkey")); + case LFUN_INSERT_BIBITEM: + return new InsetBibitem(InsetCommandParams("bibitem")); case LFUN_INSET_FLOAT: // check if the float type exists diff --git a/src/frontends/ChangeLog b/src/frontends/ChangeLog index 22d38f127f..a95b92dea1 100644 --- a/src/frontends/ChangeLog +++ b/src/frontends/ChangeLog @@ -1,3 +1,7 @@ +2003-02-21 Angus Leeming + + * Dialogs.h: remove forward declarations of InsetBibKey, InsetBibtex. + 2003-02-14 John Levon * LyXView.h: prohibit/allowInput() -> busy(bool) diff --git a/src/frontends/Dialogs.h b/src/frontends/Dialogs.h index 717e42afc9..dbb20e7645 100644 --- a/src/frontends/Dialogs.h +++ b/src/frontends/Dialogs.h @@ -20,8 +20,6 @@ #include class LyXView; -class InsetBibKey; -class InsetBibtex; class InsetCommand; class InsetError; class InsetERT; diff --git a/src/insets/Makefile.am b/src/insets/Makefile.am index 071957cc60..98871f3f6b 100644 --- a/src/insets/Makefile.am +++ b/src/insets/Makefile.am @@ -19,8 +19,10 @@ libinsets_la_SOURCES = \ inset.h \ insetbase.h \ insetbase.C \ - insetbib.C \ - insetbib.h \ + insetbibitem.C \ + insetbibitem.h \ + insetbibtex.C \ + insetbibtex.h \ insetbutton.C \ insetbutton.h \ insetcaption.C \ diff --git a/src/insets/inset.h b/src/insets/inset.h index 8cc9fa5df8..3734f69142 100644 --- a/src/insets/inset.h +++ b/src/insets/inset.h @@ -84,6 +84,8 @@ public: /// PARENT_CODE, /// + BIBITEM_CODE, + /// BIBTEX_CODE, /// TEXT_CODE, @@ -122,9 +124,7 @@ public: /// INDEX_PRINT_CODE, /// - OPTARG_CODE, - /// - BIBKEY_CODE + OPTARG_CODE }; /// diff --git a/src/insets/insetbibitem.C b/src/insets/insetbibitem.C new file mode 100644 index 0000000000..2e569cd048 --- /dev/null +++ b/src/insets/insetbibitem.C @@ -0,0 +1,152 @@ +/** + * \file insetbibitem.C + * This file is part of LyX, the document processor. + * Licence details can be found in the file COPYING. + * + * \author Alejandro Aguilar Sierra + * + * Full author contact details are available in file CREDITS + */ +#include + +#include "insetbibitem.h" +#include "buffer.h" +#include "BufferView.h" +#include "lyxlex.h" + +#include "frontends/font_metrics.h" +#include "frontends/LyXView.h" +#include "frontends/Dialogs.h" + +#include "support/lstrings.h" + + +using std::max; + + +int InsetBibitem::key_counter = 0; +const string key_prefix = "key-"; + +InsetBibitem::InsetBibitem(InsetCommandParams const & p) + : InsetCommand(p), counter(1) +{ + if (getContents().empty()) + setContents(key_prefix + tostr(++key_counter)); +} + + +Inset * InsetBibitem::clone(Buffer const &, bool) const +{ + InsetBibitem * b = new InsetBibitem(params()); + b->setCounter(counter); + return b; +} + + +void InsetBibitem::setCounter(int c) +{ + counter = c; +} + + +// I'm sorry but this is still necessary because \bibitem is used also +// as a LyX 2.x command, and lyxlex is not enough smart to understand +// real LaTeX commands. Yes, that could be fixed, but would be a waste +// of time cause LyX3 won't use lyxlex anyway. (ale) +void InsetBibitem::write(Buffer const *, std::ostream & os) const +{ + os << "\n\\bibitem "; + if (!getOptions().empty()) + os << '[' << getOptions() << ']'; + os << '{' << getContents() << "}\n"; +} + + +// This is necessary here because this is written without begin_inset +// This should be changed!!! (Jug) +void InsetBibitem::read(Buffer const *, LyXLex & lex) +{ + if (lex.eatLine()) { + scanCommand(lex.getString()); + } else { + lex.printError("InsetCommand: Parse error: `$$Token'"); + } + + if (prefixIs(getContents(), key_prefix)) { + int key = strToInt(getContents().substr(key_prefix.length())); + key_counter = max(key_counter, key); + } +} + + +string const InsetBibitem::getBibLabel() const +{ + return getOptions().empty() ? tostr(counter) : getOptions(); +} + + +string const InsetBibitem::getScreenLabel(Buffer const *) const +{ + return getContents() + " [" + getBibLabel() + ']'; +} + + +void InsetBibitem::edit(BufferView * bv, int, int, mouse_button::state) +{ + bv->owner()->getDialogs().showBibitem(this); +} + + +void InsetBibitem::edit(BufferView * bv, bool) +{ + edit(bv, 0, 0, mouse_button::none); +} + + +// ale070405 This function maybe shouldn't be here. We'll fix this at 0.13. +int bibitemMaxWidth(BufferView * bv, LyXFont const & font) +{ + int w = 0; + // Ha, now we are mainly at 1.2.0 and it is still here (Jug) + // Does look like a hack? It is! (but will change at 0.13) + ParagraphList::iterator it = bv->buffer()->paragraphs.begin(); + ParagraphList::iterator end = bv->buffer()->paragraphs.end(); + for (; it != end; ++it) { + if (it->bibitem()) { + int const wx = it->bibitem()->width(bv, font); + if (wx > w) + w = wx; + } + } + return w; +} + + +// ale070405 +string const bibitemWidest(Buffer const * buffer) +{ + int w = 0; + // Does look like a hack? It is! (but will change at 0.13) + + InsetBibitem * bitem = 0; + LyXFont font; + + ParagraphList::iterator it = buffer->paragraphs.begin(); + ParagraphList::iterator end = buffer->paragraphs.end(); + for (; it != end; ++it) { + if (it->bibitem()) { + int const wx = + font_metrics::width(it->bibitem()->getBibLabel(), + font); + if (wx > w) { + w = wx; + bitem = it->bibitem(); + } + } + } + + if (bitem && !bitem->getBibLabel().empty()) + return bitem->getBibLabel(); + + return "99"; +} diff --git a/src/insets/insetbibitem.h b/src/insets/insetbibitem.h new file mode 100644 index 0000000000..62408b63b4 --- /dev/null +++ b/src/insets/insetbibitem.h @@ -0,0 +1,70 @@ +// -*- C++ -*- +/** + * \file insetbibitem.h + * This file is part of LyX, the document processor. + * Licence details can be found in the file COPYING. + * + * \author Alejandro Aguilar Sierra + * + * Full author contact details are available in file CREDITS + */ + +#ifndef INSET_BIBITEM_H +#define INSET_BIBITEM_H + + +#include "insetcommand.h" + +class Buffer; + +/** Used to insert bibitem's information (key and label) + + Must be automatically inserted as the first object in a + bibliography paragraph. + */ +class InsetBibitem : public InsetCommand { +public: + /// + InsetBibitem(InsetCommandParams const &); + /// + Inset * clone(Buffer const &, bool same_id = false) const; + /** Currently \bibitem is used as a LyX2.x command, + so we need this method. + */ + void write(Buffer const *, std::ostream &) const; + /// + void read(Buffer const *, LyXLex & lex); + /// + virtual string const getScreenLabel(Buffer const *) const; + /// + void edit(BufferView *, int x, int y, mouse_button::state button); + /// + void edit(BufferView * bv, bool front = true); + /// + EDITABLE editable() const { return IS_EDITABLE; } + /// + Inset::Code lyxCode() const { return Inset::BIBITEM_CODE; } + /// keep .lyx format compatible + bool directWrite() const { return true; } + /// + void setCounter(int); + /// + int getCounter() const { return counter; } + /// + string const getBibLabel() const; + /// + struct Holder { + InsetBibitem * inset; + BufferView * view; + }; + +private: + /// + int counter; + /// + Holder holder; + /// + static int key_counter; +}; + +#endif // INSET_BIBITEM_H diff --git a/src/insets/insetbib.C b/src/insets/insetbibtex.C similarity index 64% rename from src/insets/insetbib.C rename to src/insets/insetbibtex.C index 084deead79..da263a4969 100644 --- a/src/insets/insetbib.C +++ b/src/insets/insetbibtex.C @@ -1,5 +1,5 @@ /** - * \file insetbib.C + * \file insetbibtex.C * This file is part of LyX, the document processor. * Licence details can be found in the file COPYING. * @@ -10,17 +10,13 @@ #include -#include "insetbib.h" +#include "insetbibtex.h" #include "buffer.h" -#include "debug.h" #include "BufferView.h" +#include "debug.h" #include "gettext.h" -#include "lyxtext.h" -#include "lyxrc.h" -#include "lyxlex.h" -#include "frontends/font_metrics.h" -#include "frontends/LyXView.h" +#include "frontends/LyXView.h" #include "frontends/Dialogs.h" #include "support/filetools.h" @@ -38,87 +34,6 @@ using std::getline; using std::endl; using std::vector; using std::pair; -using std::max; - -int InsetBibKey::key_counter = 0; -const string key_prefix = "key-"; - -InsetBibKey::InsetBibKey(InsetCommandParams const & p) - : InsetCommand(p), counter(1) -{ - if (getContents().empty()) - setContents(key_prefix + tostr(++key_counter)); -} - - -Inset * InsetBibKey::clone(Buffer const &, bool) const -{ - InsetBibKey * b = new InsetBibKey(params()); - b->setCounter(counter); - return b; -} - - -void InsetBibKey::setCounter(int c) -{ - counter = c; -} - - -// I'm sorry but this is still necessary because \bibitem is used also -// as a LyX 2.x command, and lyxlex is not enough smart to understand -// real LaTeX commands. Yes, that could be fixed, but would be a waste -// of time cause LyX3 won't use lyxlex anyway. (ale) -void InsetBibKey::write(Buffer const *, ostream & os) const -{ - os << "\n\\bibitem "; - if (!getOptions().empty()) - os << '[' << getOptions() << ']'; - os << '{' << getContents() << "}\n"; -} - - -// This is necessary here because this is written without begin_inset -// This should be changed!!! (Jug) -void InsetBibKey::read(Buffer const *, LyXLex & lex) -{ - if (lex.eatLine()) { - scanCommand(lex.getString()); - } else { - lex.printError("InsetCommand: Parse error: `$$Token'"); - } - - if (prefixIs(getContents(), key_prefix)) { - int key = strToInt(getContents().substr(key_prefix.length())); - key_counter = max(key_counter, key); - } -} - - -string const InsetBibKey::getBibLabel() const -{ - return getOptions().empty() ? tostr(counter) : getOptions(); -} - - -string const InsetBibKey::getScreenLabel(Buffer const *) const -{ - return getContents() + " [" + getBibLabel() + ']'; -} - - -void InsetBibKey::edit(BufferView * bv, int, int, mouse_button::state) -{ - bv->owner()->getDialogs().showBibitem(this); -} - - -void InsetBibKey::edit(BufferView * bv, bool) -{ - edit(bv, 0, 0, mouse_button::none); -} - - InsetBibtex::InsetBibtex(InsetCommandParams const & p, bool) @@ -312,52 +227,3 @@ bool InsetBibtex::delDatabase(string const & db) } return true; } - - -// ale070405 This function maybe shouldn't be here. We'll fix this at 0.13. -int bibitemMaxWidth(BufferView * bv, LyXFont const & font) -{ - int w = 0; - // Ha, now we are mainly at 1.2.0 and it is still here (Jug) - // Does look like a hack? It is! (but will change at 0.13) - ParagraphList::iterator it = bv->buffer()->paragraphs.begin(); - ParagraphList::iterator end = bv->buffer()->paragraphs.end(); - for (; it != end; ++it) { - if (it->bibkey()) { - int const wx = it->bibkey()->width(bv, font); - if (wx > w) - w = wx; - } - } - return w; -} - - -// ale070405 -string const bibitemWidest(Buffer const * buffer) -{ - int w = 0; - // Does look like a hack? It is! (but will change at 0.13) - - InsetBibKey * bkey = 0; - LyXFont font; - - ParagraphList::iterator it = buffer->paragraphs.begin(); - ParagraphList::iterator end = buffer->paragraphs.end(); - for (; it != end; ++it) { - if (it->bibkey()) { - int const wx = - font_metrics::width(it->bibkey()->getBibLabel(), - font); - if (wx > w) { - w = wx; - bkey = it->bibkey(); - } - } - } - - if (bkey && !bkey->getBibLabel().empty()) - return bkey->getBibLabel(); - - return "99"; -} diff --git a/src/insets/insetbib.h b/src/insets/insetbibtex.h similarity index 52% rename from src/insets/insetbib.h rename to src/insets/insetbibtex.h index 7a76f01f83..0efae323f9 100644 --- a/src/insets/insetbib.h +++ b/src/insets/insetbibtex.h @@ -1,6 +1,6 @@ // -*- C++ -*- /** - * \file insetbib.h + * \file insetbibtex.h * This file is part of LyX, the document processor. * Licence details can be found in the file COPYING. * @@ -9,8 +9,8 @@ * Full author contact details are available in file CREDITS */ -#ifndef INSET_BIB_H -#define INSET_BIB_H +#ifndef INSET_BIBTEX_H +#define INSET_BIBTEX_H #include @@ -18,57 +18,6 @@ class Buffer; -/** Used to insert bibitem's information (key and label) - - Must be automatically inserted as the first object in a - bibliography paragraph. - */ -class InsetBibKey : public InsetCommand { -public: - /// - InsetBibKey(InsetCommandParams const &); - /// - Inset * clone(Buffer const &, bool same_id = false) const; - /** Currently \bibitem is used as a LyX2.x command, - so we need this method. - */ - void write(Buffer const *, std::ostream &) const; - /// - void read(Buffer const *, LyXLex & lex); - /// - virtual string const getScreenLabel(Buffer const *) const; - /// - void edit(BufferView *, int x, int y, mouse_button::state button); - /// - void edit(BufferView * bv, bool front = true); - /// - EDITABLE editable() const { return IS_EDITABLE; } - /// - Inset::Code lyxCode() const { return Inset::BIBKEY_CODE; } - /// keep .lyx format compatible - bool directWrite() const { return true; } - /// - void setCounter(int); - /// - int getCounter() const { return counter; } - /// - string const getBibLabel() const; - /// - struct Holder { - InsetBibKey * inset; - BufferView * view; - }; - -private: - /// - int counter; - /// - Holder holder; - /// - static int key_counter; -}; - - /** Used to insert BibTeX's information */ class InsetBibtex : public InsetCommand { @@ -114,4 +63,4 @@ private: Holder holder; }; -#endif +#endif // INSET_BIBTEX_H diff --git a/src/paragraph.C b/src/paragraph.C index 0a082a5eb2..0f848a48df 100644 --- a/src/paragraph.C +++ b/src/paragraph.C @@ -26,7 +26,7 @@ #include "gettext.h" #include "changes.h" -#include "insets/insetbib.h" +#include "insets/insetbibitem.h" #include "insets/insetoptarg.h" #include "support/filetools.h" @@ -942,11 +942,11 @@ int Paragraph::getPositionOfInset(Inset const * inset) const } -InsetBibKey * Paragraph::bibkey() +InsetBibitem * Paragraph::bibitem() { InsetList::iterator it = insetlist.begin(); if (it != insetlist.end() && it.getInset()->lyxCode() == Inset::BIBTEX_CODE) - return static_cast(it.getInset()); + return static_cast(it.getInset()); return 0; } diff --git a/src/paragraph.h b/src/paragraph.h index 75e8097f32..17a14511ce 100644 --- a/src/paragraph.h +++ b/src/paragraph.h @@ -23,7 +23,7 @@ class BufferParams; class BufferView; class Counters; -class InsetBibKey; +class InsetBibitem; class Language; class LaTeXFeatures; class ParagraphParameters; @@ -151,7 +151,7 @@ public: char itemdepth; /// - InsetBibKey * bibkey(); // ale970302 + InsetBibitem * bibitem(); // ale970302 #ifndef NO_NEXT /// diff --git a/src/text.C b/src/text.C index 388b5f92c0..dbc2432193 100644 --- a/src/text.C +++ b/src/text.C @@ -33,7 +33,6 @@ #include "WordLangTuple.h" #include "paragraph_funcs.h" -#include "insets/insetbib.h" #include "insets/insettext.h" #include "support/textutils.h" diff --git a/src/text2.C b/src/text2.C index f8b6104d84..d54274f447 100644 --- a/src/text2.C +++ b/src/text2.C @@ -31,7 +31,7 @@ #include "counters.h" #include "insets/inseterror.h" -#include "insets/insetbib.h" +#include "insets/insetbibitem.h" #include "insets/insetspecialchar.h" #include "insets/insettext.h" #include "insets/insetfloat.h" @@ -1263,12 +1263,8 @@ void LyXText::setCounter(Buffer const * buf, Paragraph * par) const } else if (layout->labeltype == LABEL_BIBLIO) {// ale970302 textclass.counters().step("bibitem"); int number = textclass.counters().value("bibitem"); - //if (!par->bibkey()) { - // Inset * inset = new InsetBibKey(InsetCommandParams("bibitem")); - // //par->insertInset(0, inset); - //} - if (par->bibkey()) { - par->bibkey()->setCounter(number); + if (par->bibitem()) { + par->bibitem()->setCounter(number); par->params().labelString(layout->labelstring()); } // In biblio should't be following counters but... diff --git a/src/text3.C b/src/text3.C index 3fcc37dfa4..9de9251e6f 100644 --- a/src/text3.C +++ b/src/text3.C @@ -31,7 +31,6 @@ #include "frontends/Dialogs.h" #include "insets/insetspecialchar.h" #include "insets/insettext.h" -#include "insets/insetbib.h" #include "insets/insetquotes.h" #include "insets/insetcommand.h" #include "undo_funcs.h" @@ -1610,7 +1609,7 @@ Inset::RESULT LyXText::dispatch(FuncRequest const & cmd) case LFUN_INSET_CAPTION: #endif case LFUN_INSERT_NOTE: - case LFUN_INSERT_BIBKEY: + case LFUN_INSERT_BIBITEM: case LFUN_INSET_ERT: case LFUN_INSET_FLOAT: case LFUN_INSET_FOOTNOTE: