4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
7 * \author Angus Leeming
9 * Full author contact details are available in file CREDITS
14 #include "mailinset.h"
16 #include "BufferView.h"
18 #include "frontends/LyXView.h"
19 #include "frontends/Dialogs.h"
25 BufferView * cachedBufferView(InsetBase & inset, string const & title)
27 BufferView * const bv = inset.view();
29 lyxerr << "MailInset::" << title << ":\n"
30 << "The BufferView has not been cached!"
39 void MailInset::showDialog() const
41 BufferView * bv = cachedBufferView(inset(), "showDialog");
45 bv->owner()->getDialogs().show(name(), inset2string(), &inset());
49 void MailInset::updateDialog() const
51 BufferView * bv = cachedBufferView(inset(), "updateDDialog");
55 bv->owner()->getDialogs().update(name(), inset2string());
59 void MailInset::hideDialog() const
61 BufferView * bv = cachedBufferView(inset(), "hideDialog");
65 InsetBase * cmp = bv->owner()->getDialogs().getOpenInset(name());
67 bv->owner()->getDialogs().hide(name());