]> git.lyx.org Git - lyx.git/blobdiff - src/insets/MailInset.cpp
This should be the last of the commits refactoring the InsetLayout code.
[lyx.git] / src / insets / MailInset.cpp
index 3babfeaa1e096ab1f1bd795b8b0e52cafde69f86..c59949a3ba2cd9ff5dc946eda0e90fb418665487 100644 (file)
 #include "MailInset.h"
 
 #include "BufferView.h"
-#include "debug.h"
-#include "LyX.h"
+
+#include "frontends/Application.h"
+
+#include "support/debug.h"
 
 #include <boost/assert.hpp>
 
+using namespace std;
 
 namespace lyx {
 
-using std::string;
-
 
 void MailInset::showDialog(BufferView * bv) const
 {
        BOOST_ASSERT(bv);
-       bv->showInsetDialog(name(), inset2string(bv->buffer()), &inset());
+       bv->showDialog(name(), inset2string(bv->buffer()), &inset());
 }
 
 
@@ -40,16 +41,16 @@ void MailInset::updateDialog(BufferView * bv) const
 
 void MailInset::hideDialog() const
 {
-       LyX::cref().hideDialogs(name(), &inset());
+       if (theApp())
+               theApp()->hideDialogs(name(), &inset());
 }
 
 
 void print_mailer_error(string const & class_name,
                        string const & data, int arg_id, string const & arg)
 {
-       lyxerr << '\n' << class_name << "::string2params(" << data << ")\n"
-              << "Expected arg " << arg_id << " to be \"" << arg << "\"\n"
-              << std::endl;
+       LYXERR0('\n' << class_name << "::string2params(" << data << ")\n"
+              << "Expected arg " << arg_id << " to be \"" << arg << "\"\n");
 }