]> git.lyx.org Git - lyx.git/blob - src/frontends/gnome/FormError.C
Michael's latest batch of new gnome files.
[lyx.git] / src / frontends / gnome / FormError.C
1 /* This file is part of
2  * =================================================
3  * 
4  *          LyX, The Document Processor
5  *          Copyright 1995-2000 The LyX Team.
6  *
7  * ================================================= 
8  *
9  * \author Baruch Even
10  */
11
12 #ifdef __GNUG__
13 #pragma implementation
14 #endif
15
16 #include <config.h>
17
18 #include "gnomeBC.h"
19 #include "FormError.h"
20
21 #include <gtk--/button.h>
22 #include <gtk--/text.h>
23
24 FormError::FormError(ControlError & c)
25         : FormCB<ControlError>(c, "FormError")
26 {}
27
28
29 void FormError::build()
30 {
31         // Connect the buttons.
32         button_close()->clicked.connect(SigC::slot(this, &FormError::CloseClicked));
33
34         // Manage the buttons state
35         bc().setCancel(button_close());
36
37         // Make sure everything is in the correct state.
38         bc().refresh();
39 }
40
41
42 void FormError::update()
43 {
44         textarea()->insert(controller().params());
45 }
46
47 Gtk::Button * FormError::button_close() const 
48 {
49         return getWidget<Gtk::Button>("r_button_close");
50 }
51
52 Gtk::Text * FormError::textarea() const 
53 {
54         return getWidget<Gtk::Text>("r_textarea");
55 }