-// -*- C++ -*-
/**
* \file mailinset.C
* This file is part of LyX, the document processor.
*
* \author Angus Leeming
*
- * Full author contact details are available in file CREDITS
+ * 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"
-#include "support/LAssert.h"
-#include "Lsstream.h"
+#include "frontends/LyXView.h"
void MailInset::showDialog(BufferView * bv) const
{
- lyx::Assert(bv);
- bv->owner()->getDialogs().show(name(), inset2string(), &inset());
+ BOOST_ASSERT(bv);
+ bv->owner()->getDialogs().show(name(), inset2string(*bv->buffer()),
+ &inset());
}
void MailInset::updateDialog(BufferView * bv) const
{
- lyx::Assert(bv);
- bv->owner()->getDialogs().update(name(), inset2string());
+ BOOST_ASSERT(bv);
+ if(bv->owner()->getDialogs().visible(name()))
+ bv->owner()->getDialogs().update(name(),
+ inset2string(*bv->buffer()));
}
void MailInset::hideDialog() const
{
- Dialogs::hide()(name(), &inset());
+ Dialogs::hide(name(), &inset());
}