]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetERT.cpp
de.po
[lyx.git] / src / insets / InsetERT.cpp
index 2d96f952f636c919df1bce41594089f77231df4f..e3863ea09df1e244be261d2f92f1e1dd4dafa7b6 100644 (file)
 #include "OutputParams.h"
 #include "ParagraphParameters.h"
 #include "Paragraph.h"
-#include "TextClass.h"
 
+#include "support/docstream.h"
 #include "support/gettext.h"
 #include "support/lstrings.h"
+#include "support/TempFile.h"
 
 #include <sstream>
 
@@ -46,6 +47,11 @@ InsetERT::InsetERT(Buffer * buf, CollapseStatus status)
 }
 
 
+InsetERT::InsetERT(InsetERT const & old)
+       : InsetCollapsible(old)
+{}
+
+
 void InsetERT::write(ostream & os) const
 {
        os << "ERT" << "\n";
@@ -128,6 +134,9 @@ bool InsetERT::getStatus(Cursor & cur, FuncRequest const & cmd,
        FuncStatus & status) const
 {
        switch (cmd.action()) {
+       case LFUN_INSET_INSERT:
+               status.setEnabled(false);
+               return true;
        case LFUN_INSET_MODIFY:
                if (cmd.getArg(0) == "ert") {
                        status.setEnabled(true);
@@ -141,6 +150,7 @@ bool InsetERT::getStatus(Cursor & cur, FuncRequest const & cmd,
 }
 
 
+
 docstring const InsetERT::buttonLabel(BufferView const & bv) const
 {
        if (decoration() == InsetLayout::CLASSIC)