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"
|
|
|
|
#include "inset.h"
|
|
|
|
#include "BufferView.h"
|
|
|
|
#include "frontends/LyXView.h"
|
|
|
|
#include "frontends/Dialogs.h"
|
2003-03-10 22:12:07 +00:00
|
|
|
#include "support/LAssert.h"
|
2003-02-25 14:51:38 +00:00
|
|
|
#include "Lsstream.h"
|
|
|
|
|
2003-06-30 23:56:22 +00:00
|
|
|
using namespace lyx::support;
|
2003-02-25 14:51:38 +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-06-30 23:56:22 +00:00
|
|
|
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-06-30 23:56:22 +00:00
|
|
|
Assert(bv);
|
2003-06-06 08:06:24 +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
|
|
|
}
|