]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/controllers/ControlPreamble.C
port the graphics dialog to the new scheme and get rid of the ControlInset
[lyx.git] / src / frontends / controllers / ControlPreamble.C
index 25319b1c83a9ce40dc0787311a77ac8016a09aff..fa96853c968eac4aba3432073c8259b9a2795e18 100644 (file)
@@ -10,9 +10,6 @@
 
 #include <config.h>
 
-#ifdef __GNUG__
-#pragma implementation
-#endif
 
 #include "ControlPreamble.h"
 
 #include "buffer.h"
 #include "gettext.h"
 
-#include "frontends/Liason.h"
+#include "frontends/LyXView.h"
 
 
 ControlPreamble::ControlPreamble(LyXView & lv, Dialogs & d)
-       : ControlDialogBD(lv, d),
-         params_(0)
+       : ControlDialogBD(lv, d)
 {}
 
 
@@ -39,26 +35,29 @@ void ControlPreamble::apply()
 
        buffer()->params.preamble = params();
        buffer()->markDirty();
-       Liason::setMinibuffer(&lv_, _("LaTeX preamble set"));
+       lv_.message(_("LaTeX preamble set"));
 }
 
 
-string & ControlPreamble::params() const
+string const & ControlPreamble::params() const
 {
-       lyx::Assert(params_);
-       return *params_;
+       return params_;
+}
+
+
+void ControlPreamble::params(string const & newparams)
+{
+       params_ = newparams;
 }
 
 
 void ControlPreamble::setParams()
 {
-       delete params_;
-       params_ = new string(buffer()->params.preamble);
+       params_ = buffer()->params.preamble;
 }
 
 
 void ControlPreamble::clearParams()
 {
-       delete params_;
-       params_ = 0;
+       params_.erase();
 }