]> git.lyx.org Git - lyx.git/blob - src/insets/MailInset.cpp
* Inset: Prepare for an eventual merge of updateLabels() and addToToc()
[lyx.git] / src / insets / MailInset.cpp
1 /**
2  * \file MailInset.cpp
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 "support/debug.h"
17
18 #include "frontends/Application.h"
19
20 #include <boost/assert.hpp>
21
22 using namespace std;
23
24 namespace lyx {
25
26
27 void MailInset::showDialog(BufferView * bv) const
28 {
29         BOOST_ASSERT(bv);
30         bv->showDialog(name(), inset2string(bv->buffer()), &inset());
31 }
32
33
34 void MailInset::updateDialog(BufferView * bv) const
35 {
36         BOOST_ASSERT(bv);
37         bv->updateDialog(name(), inset2string(bv->buffer()));
38 }
39
40
41 void MailInset::hideDialog() const
42 {
43         if (theApp())
44                 theApp()->hideDialogs(name(), &inset());
45 }
46
47
48 void print_mailer_error(string const & class_name,
49                         string const & data, int arg_id, string const & arg)
50 {
51         LYXERR0('\n' << class_name << "::string2params(" << data << ")\n"
52                << "Expected arg " << arg_id << " to be \"" << arg << "\"\n");
53 }
54
55
56 } // namespace lyx