]> git.lyx.org Git - lyx.git/blob - src/frontends/gnome/GError.C
gtkmm-2 upgrade. Still some small bugs to iron out, but mostly functional
[lyx.git] / src / frontends / gnome / GError.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 Michael Koziarski
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 "GError.h"
21
22 #include <gtkmm/button.h>
23 #include <gtkmm/textview.h>
24
25 GErrorDialog::GErrorDialog(ControlError & c)
26         : FormCB<ControlError>(c, "GError")
27 {}
28
29
30 void GErrorDialog::build()
31 {
32         // Connect the buttons.
33         button_close()->signal_clicked().connect(
34                 SigC::slot(*this, &GErrorDialog::CloseClicked)
35                 );
36
37         // Manage the buttons state
38         bc().setCancel(button_close());
39
40         // Make sure everything is in the correct state.
41         bc().refresh();
42 }
43
44
45 void GErrorDialog::update()
46 {
47         textarea()->get_buffer()->set_text(controller().params());
48 }
49
50 Gtk::Button * GErrorDialog::button_close() const 
51 {
52         return getWidget<Gtk::Button>("r_button_close");
53 }
54
55 Gtk::TextView * GErrorDialog::textarea() const 
56 {
57         return getWidget<Gtk::TextView>("r_textarea");
58 }