#include "mailinset.h"
#include "BufferView.h"
+#include "debug.h"
#include "frontends/Dialogs.h"
-#include "frontends/LyXView.h"
-#include "support/LAssert.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()));
}
{
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