]> git.lyx.org Git - features.git/blob - src/frontends/gtk/GBC.C
The Gtk patch.
[features.git] / src / frontends / gtk / GBC.C
1 /**
2  * \file GBC.C
3  * This file is part of LyX, the document processor.
4  * Licence details can be found in the file COPYING.
5  *
6  * \author Huang Ying
7  *
8  * Full author contact details are available in file CREDITS
9  */
10
11 #include <config.h>
12 #include <gtkmm.h>
13
14 #include "GBC.h"
15
16
17 GBC::GBC(ButtonController const & parent,
18          string const & cancel, string const & close)
19         : GuiBC<Gtk::Button, Gtk::Widget>(parent, cancel, close)
20 {
21 }
22
23
24 void GBC::setButtonEnabled(Gtk::Button * btn, bool enabled) const
25 {
26         btn->set_sensitive(enabled);
27 }
28
29
30 void GBC::setWidgetEnabled(Gtk::Widget * widget, bool enabled) const
31 {
32         widget->set_sensitive(enabled);
33 }
34
35
36 void GBC::setButtonLabel(Gtk::Button * btn, string const & label) const
37 {
38         btn->set_label(Glib::locale_to_utf8(label));
39 }