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