2003-02-25 14:51:38 +00:00
|
|
|
// -*- C++ -*-
|
|
|
|
/**
|
|
|
|
* \file mailinset.C
|
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
* Licence details can be found in the file COPYING.
|
|
|
|
*
|
|
|
|
* \author Angus Leeming
|
|
|
|
*
|
|
|
|
* Full author contact details are available in file CREDITS
|
|
|
|
*/
|
|
|
|
|
|
|
|
#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-02-25 14:51:38 +00:00
|
|
|
bv->owner()->getDialogs().show(name(), inset2string(), &inset());
|
|
|
|
}
|
|
|
|
|
|
|
|
|
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()))
|
|
|
|
bv->owner()->getDialogs().update(name(), inset2string());
|
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
|
|
|
}
|