X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2Fmailinset.C;h=22db2e8171c1520ce17cd5e161cf6e92b9e011de;hb=e28331ed63062dea10d0a21b9ec12034b4b17b9a;hp=8cf6e8606f7fe19ebc901b2784a0892522888fb9;hpb=7ac850e36d4dba4007ca2c0949f8062cc207eaa3;p=lyx.git diff --git a/src/insets/mailinset.C b/src/insets/mailinset.C index 8cf6e8606f..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,52 @@ * * \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" + + +namespace lyx { + +using std::string; void MailInset::showDialog(BufferView * bv) const { - lyx::Assert(bv); - bv->owner()->getDialogs().show(name(), inset2string(), &inset()); + BOOST_ASSERT(bv); + bv->showInsetDialog(name(), inset2string(*bv->buffer()), + &inset()); } void MailInset::updateDialog(BufferView * bv) const { - lyx::Assert(bv); - bv->owner()->getDialogs().update(name(), inset2string()); + BOOST_ASSERT(bv); + bv->updateDialog(name(), inset2string(*bv->buffer())); } void MailInset::hideDialog() const { - Dialogs::hide()(name(), &inset()); + 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