]> git.lyx.org Git - lyx.git/blob - src/frontends/xforms/FormError.C
remove defaults stuff, let Qt handle no toolbar
[lyx.git] / src / frontends / xforms / FormError.C
1 /**
2  * \file FormError.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
12 #include <config.h>
13
14 #include "xformsBC.h"
15 #include "ControlError.h"
16 #include "FormError.h"
17 #include "forms/form_error.h"
18 #include "xforms_helpers.h" // formatted
19 #include FORMS_H_LOCATION
20
21 typedef FormController<ControlError, FormView<FD_error> > base_class;
22
23 FormError::FormError(Dialog & parent)
24         : base_class(parent, _("LaTeX Error"))
25 {}
26
27
28 void FormError::build()
29 {
30         dialog_.reset(build_error(this));
31
32         // Manage the cancel/close button
33         bcview().setCancel(dialog_->button_close);
34 }
35
36
37 void FormError::update()
38 {
39         string const txt = formatted(controller().params(),
40                                      dialog_->frame_message->w - 10);
41         fl_set_object_label(dialog_->frame_message, txt.c_str());
42 }