2003-02-25 14:51:38 +00:00
|
|
|
/**
|
|
|
|
* \file mailinset.C
|
|
|
|
* 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>
|
|
|
|
|
|
|
|
#include "mailinset.h"
|
2003-09-05 09:01:27 +00:00
|
|
|
|
2003-02-25 14:51:38 +00:00
|
|
|
#include "BufferView.h"
|
2003-12-11 15:23:15 +00:00
|
|
|
#include "debug.h"
|
2003-09-05 09:01:27 +00:00
|
|
|
|
2003-02-25 14:51:38 +00:00
|
|
|
#include "frontends/Dialogs.h"
|
2003-09-05 09:01:27 +00:00
|
|
|
|
2003-12-11 15:23:15 +00:00
|
|
|
using std::string;
|
|
|
|
|
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);
|
2006-09-19 13:36:20 +00:00
|
|
|
bv->showInsetDialog(name(), inset2string(*bv->buffer()),
|
2003-07-23 09:54:21 +00:00
|
|
|
&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);
|
2006-09-19 13:36:20 +00:00
|
|
|
bv->updateDialog(name(), inset2string(*bv->buffer()));
|
2003-02-25 14:51:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void MailInset::hideDialog() const
|
|
|
|
{
|
2003-03-12 22:17:50 +00:00
|
|
|
Dialogs::hide(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)
|
|
|
|
{
|
2003-12-12 10:05:21 +00:00
|
|
|
lyxerr << '\n' << class_name << "::string2params(" << data << ")\n"
|
|
|
|
<< "Expected arg " << arg_id << " to be \"" << arg << "\"\n"
|
2003-12-11 15:23:15 +00:00
|
|
|
<< std::endl;
|
|
|
|
}
|