X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2FMailInset.cpp;h=c59949a3ba2cd9ff5dc946eda0e90fb418665487;hb=2c357c1d23b7b83839a9beb8225d4f1ae4f793b4;hp=6a7d09edd2dbc35339081cdc5bc3041fbf70d1f8;hpb=32268e2632df5ee325d9a3589e514590b62fb65f;p=lyx.git diff --git a/src/insets/MailInset.cpp b/src/insets/MailInset.cpp index 6a7d09edd2..c59949a3ba 100644 --- a/src/insets/MailInset.cpp +++ b/src/insets/MailInset.cpp @@ -13,42 +13,44 @@ #include "MailInset.h" #include "BufferView.h" -#include "debug.h" -#include "LyX.h" +#include "frontends/Application.h" -namespace lyx { +#include "support/debug.h" + +#include -using std::string; +using namespace std; + +namespace lyx { void MailInset::showDialog(BufferView * bv) const { BOOST_ASSERT(bv); - bv->showInsetDialog(name(), inset2string(*bv->buffer()), - &inset()); + bv->showDialog(name(), inset2string(bv->buffer()), &inset()); } void MailInset::updateDialog(BufferView * bv) const { BOOST_ASSERT(bv); - bv->updateDialog(name(), inset2string(*bv->buffer())); + bv->updateDialog(name(), inset2string(bv->buffer())); } 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"); }