]> git.lyx.org Git - lyx.git/blob - src/frontends/xforms/FormError.C
change some __GNUG_ to __GNUG__
[lyx.git] / src / frontends / xforms / FormError.C
1 /*
2  * \file FormError.C
3  * Copyright 2000-2001 The LyX Team.
4  * See the file COPYING.
5  *
6  * \author Angus Leeming, a.leeming@ic.ac.uk
7  */
8
9 #ifdef __GNUG__
10 #pragma implementation
11 #endif
12
13 #include <config.h>
14
15 #include "xformsBC.h"
16 #include "ControlError.h"
17 #include "FormError.h"
18 #include "form_error.h"
19 #include "xforms_helpers.h" // formatted
20
21 typedef FormCB<ControlError, FormDB<FD_form_error> > base_class;
22
23 FormError::FormError(ControlError & c)
24         : base_class(c, _("LaTeX Error"))
25 {}
26
27
28 void FormError::build()
29 {
30         dialog_.reset(build_error());
31
32         // Manage the cancel/close button
33         bc().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 }