#include "insetbibitem.h"
#include "buffer.h"
#include "BufferView.h"
+#include "funcrequest.h"
#include "lyxlex.h"
#include "frontends/font_metrics.h"
}
+dispatch_result InsetBibitem::localDispatch(FuncRequest const & cmd)
+{
+ Inset::RESULT result = UNDISPATCHED;
+
+ switch (cmd.action) {
+ case LFUN_INSET_MODIFY: {
+ InsetCommandParams p;
+ InsetCommandMailer::string2params(cmd.argument, p);
+ if (p.getCmdName().empty())
+ break;
+
+ if (view() && p.getContents() != params().getContents()) {
+ view()->ChangeCitationsIfUnique(params().getContents(),
+ p.getContents());
+ }
+
+ setParams(p);
+ cmd.view()->updateInset(this);
+ result = DISPATCHED;
+ }
+ break;
+ default:
+ result = InsetCommand::localDispatch(cmd);
+ }
+
+ return result;
+}
+
+
void InsetBibitem::setCounter(int c)
{
counter = c;
}
-void InsetBibitem::edit(BufferView *, int, int, mouse_button::state)
+void InsetBibitem::edit(BufferView * bv, int, int, mouse_button::state)
{
InsetCommandMailer mailer("bibitem", *this);
- mailer.showDialog();
+ mailer.showDialog(bv);
}