]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insetcite.C
parlist-a-1.diff
[lyx.git] / src / insets / insetcite.C
index 24f2b12325c7c4d2895b04ca4d32d7ead95bdb8a..8bd95bfdbea5f73c6cad53c8bd0767386521126c 100644 (file)
 
 #include <config.h>
 
-#ifdef __GNUG__
-#pragma implementation
-#endif
-
 #include "insetcite.h"
 #include "buffer.h"
 #include "BufferView.h"
 #include "LaTeXFeatures.h"
-#include "frontends/LyXView.h"
-#include "debug.h"
-#include "gettext.h"
 
 #include "frontends/controllers/biblio.h"
-#include "frontends/Dialogs.h"
 
-#include "support/filetools.h"
 #include "support/lstrings.h"
-#include "support/path.h"
-#include "support/os.h"
-#include "support/lstrings.h"
-#include "support/LAssert.h"
 
 #include <map>
 
@@ -69,7 +56,8 @@ string const getNatbibLabel(Buffer const * buffer,
        if (loadkeys) {
                // build the keylist
                typedef vector<std::pair<string, string> > InfoType;
-               InfoType bibkeys = buffer->getBibkeyList();
+               InfoType bibkeys;
+               buffer->fillWithBibKeys(bibkeys);
 
                InfoType::const_iterator bit  = bibkeys.begin();
                InfoType::const_iterator bend = bibkeys.end();
@@ -237,6 +225,13 @@ InsetCitation::InsetCitation(InsetCommandParams const & p, bool)
 {}
 
 
+InsetCitation::~InsetCitation()
+{
+       InsetCommandMailer mailer("citation", *this);
+       mailer.hideDialog();
+}
+
+
 string const InsetCitation::generateLabel(Buffer const * buffer) const
 {
        string const before = string();
@@ -328,7 +323,8 @@ void InsetCitation::edit(BufferView * bv, int, int, mouse_button::state)
        // buffer but doing some real work.
        setLoadingBuffer(bv->buffer(), false);
 
-       bv->owner()->getDialogs().showCitation(this);
+       InsetCommandMailer mailer("citation", *this);
+       mailer.showDialog(bv);
 }