2003-02-25 14:51:38 +00:00
|
|
|
/**
|
2007-04-25 01:24:38 +00:00
|
|
|
* \file MailInset.cpp
|
2003-02-25 14:51:38 +00:00
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
* Licence details can be found in the file COPYING.
|
|
|
|
*
|
|
|
|
* \author Angus Leeming
|
|
|
|
*
|
2003-08-23 00:17:00 +00:00
|
|
|
* Full author contact details are available in file CREDITS.
|
2003-02-25 14:51:38 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include <config.h>
|
|
|
|
|
2007-04-25 01:24:38 +00:00
|
|
|
#include "MailInset.h"
|
2003-09-05 09:01:27 +00:00
|
|
|
|
2003-02-25 14:51:38 +00:00
|
|
|
#include "BufferView.h"
|
2007-11-29 07:04:28 +00:00
|
|
|
#include "support/debug.h"
|
2007-11-17 15:32:12 +00:00
|
|
|
|
|
|
|
#include "frontends/Application.h"
|
2003-09-05 09:01:27 +00:00
|
|
|
|
2007-11-07 20:14:30 +00:00
|
|
|
#include <boost/assert.hpp>
|
|
|
|
|
2007-12-12 10:16:00 +00:00
|
|
|
using namespace std;
|
2006-10-21 00:16:43 +00:00
|
|
|
|
|
|
|
namespace lyx {
|
|
|
|
|
2003-09-05 09:01:27 +00:00
|
|
|
|
2003-03-10 22:12:07 +00:00
|
|
|
void MailInset::showDialog(BufferView * bv) const
|
2003-02-25 14:51:38 +00:00
|
|
|
{
|
2003-09-09 17:25:35 +00:00
|
|
|
BOOST_ASSERT(bv);
|
2007-11-18 00:39:15 +00:00
|
|
|
bv->showDialog(name(), inset2string(bv->buffer()), &inset());
|
2003-02-25 14:51:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2003-03-10 22:12:07 +00:00
|
|
|
void MailInset::updateDialog(BufferView * bv) const
|
2003-02-25 14:51:38 +00:00
|
|
|
{
|
2003-09-09 17:25:35 +00:00
|
|
|
BOOST_ASSERT(bv);
|
2007-08-21 13:03:55 +00:00
|
|
|
bv->updateDialog(name(), inset2string(bv->buffer()));
|
2003-02-25 14:51:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void MailInset::hideDialog() const
|
|
|
|
{
|
2007-12-10 22:52:59 +00:00
|
|
|
if (theApp())
|
|
|
|
theApp()->hideDialogs(name(), &inset());
|
2003-02-25 14:51:38 +00:00
|
|
|
}
|
2003-12-11 15:23:15 +00:00
|
|
|
|
|
|
|
|
|
|
|
void print_mailer_error(string const & class_name,
|
|
|
|
string const & data, int arg_id, string const & arg)
|
|
|
|
{
|
2007-11-28 22:12:03 +00:00
|
|
|
LYXERR0('\n' << class_name << "::string2params(" << data << ")\n"
|
|
|
|
<< "Expected arg " << arg_id << " to be \"" << arg << "\"\n");
|
2003-12-11 15:23:15 +00:00
|
|
|
}
|
2006-10-21 00:16:43 +00:00
|
|
|
|
|
|
|
|
|
|
|
} // namespace lyx
|