]> git.lyx.org Git - lyx.git/blob - src/insets/mailinset.C
The speed patch: redraw only rows that have changed
[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->owner()->getDialogs().show(name(), inset2string(*bv->buffer()),
28                                        &inset());
29 }
30
31
32 void MailInset::updateDialog(BufferView * bv) const
33 {
34         BOOST_ASSERT(bv);
35         if (bv->owner()->getDialogs().visible(name()))
36                 bv->owner()->getDialogs().update(name(),
37                                                  inset2string(*bv->buffer()));
38 }
39
40
41 void MailInset::hideDialog() const
42 {
43         Dialogs::hide(name(), &inset());
44 }
45
46
47 void print_mailer_error(string const & class_name,
48                         string const & data, int arg_id, string const & arg)
49 {
50         lyxerr << '\n' << class_name << "::string2params(" << data << ")\n"
51                << "Expected arg " << arg_id << " to be \"" << arg << "\"\n"
52                << std::endl;
53 }