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
|
|
|
#include "frontends/LyXView.h"
|
|
|
|
|
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);
|
2003-07-23 09:54:21 +00:00
|
|
|
bv->owner()->getDialogs().show(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);
|
2003-10-21 16:15:14 +00:00
|
|
|
if (bv->owner()->getDialogs().visible(name()))
|
2003-07-23 09:54:21 +00:00
|
|
|
bv->owner()->getDialogs().update(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)
|
|
|
|
{
|
|
|
|
lyxerr << class_name << "::string2params(" << data << ")\n"
|
|
|
|
<< "Expected arg " << arg_id << "to be \"" << arg << '"'
|
|
|
|
<< std::endl;
|
|
|
|
}
|