#include <cstdio>
+using namespace lyx::support;
+
using std::endl;
Inset * createInset(FuncRequest const & cmd)
return new InsetMinipage(params);
case LFUN_INSERT_NOTE:
- return new InsetNote(params);
+ return new InsetNote(params, "Note");
case LFUN_INSET_ERT:
return new InsetERT(params);
InsetExternal::Params iep;
InsetExternalMailer::string2params(cmd.argument, iep);
InsetExternal * inset = new InsetExternal;
- inset->setFromParams(iep);
+ string const fpath = cmd.view()->buffer()->filePath();
+ inset->setParams(iep, fpath);
return inset;
} else if (name == "graphics") {
+ string const fpath = cmd.view()->buffer()->filePath();
InsetGraphicsParams igp;
- InsetGraphicsMailer::string2params(cmd.argument, igp);
+ InsetGraphicsMailer::string2params(cmd.argument, fpath,
+ igp);
InsetGraphics * inset = new InsetGraphics;
- string const fpath = cmd.view()->buffer()->filePath();
- inset->setParams(igp, fpath);
+ inset->setParams(igp);
return inset;
} else if (name == "include") {
inset = new InsetFormula;
} else if (tmptok == "Graphics") {
inset = new InsetGraphics;
- } else if (tmptok == "Note") {
- inset = new InsetNote(buf.params);
+ } else if (tmptok == "Note" || tmptok == "Comment"
+ || tmptok == "Greyedout") {
+ inset = new InsetNote(buf.params, tmptok);
} else if (tmptok == "Include") {
InsetCommandParams p("Include");
inset = new InsetInclude(p, buf);