X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2Fmailinset.C;h=22db2e8171c1520ce17cd5e161cf6e92b9e011de;hb=e28331ed63062dea10d0a21b9ec12034b4b17b9a;hp=789c694dd218278f09e793e23cec4ac8b796f306;hpb=7668244a7764ef252dbd3201332ab47107a68853;p=lyx.git diff --git a/src/insets/mailinset.C b/src/insets/mailinset.C index 789c694dd2..22db2e8171 100644 --- a/src/insets/mailinset.C +++ b/src/insets/mailinset.C @@ -1,4 +1,3 @@ -// -*- C++ -*- /** * \file mailinset.C * This file is part of LyX, the document processor. @@ -6,35 +5,36 @@ * * \author Angus Leeming * - * Full author contact details are available in file CREDITS + * Full author contact details are available in file CREDITS. */ #include #include "mailinset.h" -#include "inset.h" + #include "BufferView.h" -#include "frontends/LyXView.h" +#include "debug.h" + #include "frontends/Dialogs.h" -#include "support/LAssert.h" -#include "Lsstream.h" -using namespace lyx::support; + +namespace lyx { + +using std::string; + void MailInset::showDialog(BufferView * bv) const { - Assert(bv); - bv->owner()->getDialogs().show(name(), inset2string(*bv->buffer()), + BOOST_ASSERT(bv); + bv->showInsetDialog(name(), inset2string(*bv->buffer()), &inset()); } void MailInset::updateDialog(BufferView * bv) const { - Assert(bv); - if(bv->owner()->getDialogs().visible(name())) - bv->owner()->getDialogs().update(name(), - inset2string(*bv->buffer())); + BOOST_ASSERT(bv); + bv->updateDialog(name(), inset2string(*bv->buffer())); } @@ -42,3 +42,15 @@ void MailInset::hideDialog() const { Dialogs::hide(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; +} + + +} // namespace lyx