]> git.lyx.org Git - lyx.git/blob - src/frontends/gnome/GError.C
d6b13e34d0a41a2f4b7f63368142bec2706e47ca
[lyx.git] / src / frontends / gnome / GError.C
1 /**
2  * \file GError.C
3  * This file is part of LyX, the document processor.
4  * Licence details can be found in the file COPYING.
5  *
6  * \author Michael Koziarski
7  * \author Baruch Even
8  *
9  * Full author contact details are available in file CREDITS
10  */
11
12 #ifdef __GNUG__
13 #pragma implementation
14 #endif
15
16 #include <config.h>
17
18 #include "gnomeBC.h"
19 #include "GError.h"
20
21 #include <gtkmm/button.h>
22 #include <gtkmm/textview.h>
23
24 GErrorDialog::GErrorDialog(ControlError & c)
25         : GnomeCB<ControlError>(c, "GError")
26 {}
27
28
29 void GErrorDialog::build()
30 {
31         // Connect the buttons.
32         button_close()->signal_clicked().connect(
33                 SigC::slot(*this, &GErrorDialog::CloseClicked)
34                 );
35
36         // Manage the buttons state
37         bc().setCancel(button_close());
38
39         // Make sure everything is in the correct state.
40         bc().refresh();
41 }
42
43
44 void GErrorDialog::update()
45 {
46         textarea()->get_buffer()->set_text(controller().params());
47 }
48
49 Gtk::Button * GErrorDialog::button_close() const
50 {
51         return getWidget<Gtk::Button>("r_button_close");
52 }
53
54 Gtk::TextView * GErrorDialog::textarea() const
55 {
56         return getWidget<Gtk::TextView>("r_textarea");
57 }