]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetExternal.cpp
Remove all BufferParam arguments in InsetXXX methods (since insets know about their...
[lyx.git] / src / insets / InsetExternal.cpp
index 1fafc96a6e26500e353513de873a7ebf9f63969b..cbe07b87f88170acdadff00032b6a1aaf5326a38 100644 (file)
@@ -414,13 +414,6 @@ void InsetExternal::doDispatch(Cursor & cur, FuncRequest & cmd)
                        params2string(params(), cur.bv().buffer()));
                break;
 
-       case LFUN_MOUSE_RELEASE:
-               if (!cur.selection() && cmd.button() == mouse_button::button1)
-                       cur.bv().showDialog("external",
-                               params2string(params(), cur.bv().buffer()),
-                               this);
-               break;
-
        default:
                Inset::doDispatch(cur, cmd);
        }
@@ -444,11 +437,11 @@ bool InsetExternal::getStatus(Cursor & cur, FuncRequest const & cmd,
 }
 
 
-void InsetExternal::edit(Cursor & cur, bool, EntryDirection)
+bool InsetExternal::showInsetDialog(BufferView * bv) const
 {
-       cur.bv().showDialog("external",
-               params2string(params(), cur.bv().buffer()),
-               this);
+       bv->showDialog("external", params2string(params(), bv->buffer()),
+               const_cast<InsetExternal *>(this));
+       return true;
 }
 
 
@@ -539,6 +532,12 @@ InsetExternalParams const & InsetExternal::params() const
 }
 
 
+void InsetExternal::updatePreview()
+{
+       setParams(params_);
+}
+
+
 void InsetExternal::setParams(InsetExternalParams const & p)
 {
        params_ = p;
@@ -683,6 +682,16 @@ int InsetExternal::docbook(odocstream & os,
 }
 
 
+docstring InsetExternal::xhtml(odocstream & /*os*/,
+                       OutputParams const & /*rp*/) const
+{
+//     external::writeExternal(params_, "XHTML", buffer(), os,
+//                                    *(runparams.exportdata), false,
+//                                    runparams.dryrun || runparams.inComment);
+       return docstring();
+}
+
+
 void InsetExternal::validate(LaTeXFeatures & features) const
 {
        if (params_.draft)
@@ -700,6 +709,7 @@ void InsetExternal::validate(LaTeXFeatures & features) const
                format = "LaTeX";
                break;
        case OutputParams::PDFLATEX:
+       case OutputParams::XETEX:
                format = "PDFLaTeX";
                break;
        case OutputParams::XML: