+dispatch_result InsetBibtex::localDispatch(FuncRequest const & cmd)
+{
+ switch (cmd.action) {
+
+ case LFUN_INSET_EDIT:
+ InsetCommandMailer("bibtex", *this).showDialog(cmd.view());
+ return DISPATCHED;
+
+ case LFUN_INSET_MODIFY: {
+ InsetCommandParams p;
+ InsetCommandMailer::string2params(cmd.argument, p);
+ if (p.getCmdName().empty())
+ return DISPATCHED;
+
+ if (view() && p.getContents() != params().getContents()) {
+ view()->ChangeCitationsIfUnique(params().getContents(),
+ p.getContents());
+ }
+
+ setParams(p);
+ cmd.view()->updateInset(this);
+ return DISPATCHED;
+ }
+
+ default:
+ return InsetCommand::localDispatch(cmd);
+ }
+
+}
+