]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insetert.C
fix compilation pb ; update eu.po
[lyx.git] / src / insets / insetert.C
index 67af3e3d132e86578991aed04771299b73a557aa..c83ad95e4eee2653cdd879d8819dc011443efe36 100644 (file)
@@ -16,8 +16,8 @@
 #include "insetert.h"
 #include "gettext.h"
 #include "lyxfont.h"
-#include "Painter.h"
 #include "buffer.h"
+#include "insets/insettext.h"
 #include "support/LOstream.h"
 #include "lyx_gui_misc.h"
 
@@ -25,15 +25,15 @@ using std::ostream;
 
 InsetERT::InsetERT() : InsetCollapsable()
 {
-    setLabel(_("ERT"));
-    LyXFont font(LyXFont::ALL_SANE);
-    font.setLatex (LyXFont::ON);
-    labelfont = LyXFont(LyXFont::ALL_SANE);
-    labelfont.decSize();
-    labelfont.decSize();
-    labelfont.setColor(LColor::ert);
-    setAutoCollapse(false);
-    setInsetName("ERT");
+       setLabel(_("ERT"));
+       LyXFont font(LyXFont::ALL_SANE);
+       font.setLatex (LyXFont::ON);
+       labelfont = LyXFont(LyXFont::ALL_SANE);
+       labelfont.decSize();
+       labelfont.decSize();
+       labelfont.setColor(LColor::ert);
+       setAutoCollapse(false);
+       setInsetName("ERT");
 }
 
 
@@ -44,38 +44,33 @@ void InsetERT::Write(Buffer const * buf, ostream & os) const
 }
 
 
-Inset * InsetERT::Clone() const
+Inset * InsetERT::Clone(Buffer const &) const
 {
-    InsetERT * result = new InsetERT();
-    result->init(this);
-
-    result->collapsed = collapsed;
-    return result;
+       InsetERT * result = new InsetERT;
+       result->inset.init(&inset);
+       
+       result->collapsed = collapsed;
+       return result;
 }
 
 
-char const * InsetERT::EditMessage() const 
+string const InsetERT::EditMessage() const 
 {
        return _("Opened ERT Inset");
 }
 
 
-bool InsetERT::InsertInset(BufferView *, Inset *)
-{
-    return false;
-}
-
-
 void InsetERT::SetFont(BufferView *, LyXFont const &, bool)
 {
-    WriteAlert(_("Impossible Operation!"),
-              _("Not permitted to change font-types inside ERT-insets!"),
-              _("Sorry."));
+       WriteAlert(_("Impossible Operation!"),
+                  _("Not permitted to change font-types inside ERT-insets!"),
+                  _("Sorry."));
 }
 
+
 void InsetERT::Edit(BufferView * bv, int x, int y, unsigned int button)
 {
-    InsetCollapsable::Edit(bv, x, y, button);
-    LyXFont font(LyXFont::ALL_SANE);
-    font.setLatex (LyXFont::ON);
+       InsetCollapsable::Edit(bv, x, y, button);
+       LyXFont font(LyXFont::ALL_SANE);
+       font.setLatex (LyXFont::ON);
 }