]> git.lyx.org Git - lyx.git/blob - src/insets/mailinset.C
This is the continuation of my BufferView/LyXView cleanup. This commit replaces Buffe...
[lyx.git] / src / insets / mailinset.C
1 /**
2  * \file mailinset.C
3  * This file is part of LyX, the document processor.
4  * Licence details can be found in the file COPYING.
5  *
6  * \author Angus Leeming
7  *
8  * Full author contact details are available in file CREDITS.
9  */
10
11 #include <config.h>
12
13 #include "mailinset.h"
14
15 #include "BufferView.h"
16 #include "debug.h"
17
18 #include "frontends/Dialogs.h"
19 #include "frontends/LyXView.h"
20
21 using std::string;
22
23
24 void MailInset::showDialog(BufferView * bv) const
25 {
26         BOOST_ASSERT(bv);
27         bv->showInsetDialog(name(), inset2string(*bv->buffer()),
28                                        &inset());
29 }
30
31
32 void MailInset::updateDialog(BufferView * bv) const
33 {
34         BOOST_ASSERT(bv);
35         bv->updateDialog(name(), inset2string(*bv->buffer()));
36 }
37
38
39 void MailInset::hideDialog() const
40 {
41         Dialogs::hide(name(), &inset());
42 }
43
44
45 void print_mailer_error(string const & class_name,
46                         string const & data, int arg_id, string const & arg)
47 {
48         lyxerr << '\n' << class_name << "::string2params(" << data << ")\n"
49                << "Expected arg " << arg_id << " to be \"" << arg << "\"\n"
50                << std::endl;
51 }