]> git.lyx.org Git - lyx.git/blob - src/insets/mailinset.C
Free BufferView from LyXView!
[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
20 using std::string;
21
22
23 void MailInset::showDialog(BufferView * bv) const
24 {
25         BOOST_ASSERT(bv);
26         bv->showInsetDialog(name(), inset2string(*bv->buffer()),
27                                        &inset());
28 }
29
30
31 void MailInset::updateDialog(BufferView * bv) const
32 {
33         BOOST_ASSERT(bv);
34         bv->updateDialog(name(), inset2string(*bv->buffer()));
35 }
36
37
38 void MailInset::hideDialog() const
39 {
40         Dialogs::hide(name(), &inset());
41 }
42
43
44 void print_mailer_error(string const & class_name,
45                         string const & data, int arg_id, string const & arg)
46 {
47         lyxerr << '\n' << class_name << "::string2params(" << data << ")\n"
48                << "Expected arg " << arg_id << " to be \"" << arg << "\"\n"
49                << std::endl;
50 }