]> git.lyx.org Git - lyx.git/blob - src/frontends/gtk/GBC.C
some tabular fixes for the problems reported by Helge
[lyx.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
13 // Too hard to make concept checks work with this file
14 #ifdef _GLIBCXX_CONCEPT_CHECKS
15 #undef _GLIBCXX_CONCEPT_CHECKS
16 #endif
17 #ifdef _GLIBCPP_CONCEPT_CHECKS
18 #undef _GLIBCPP_CONCEPT_CHECKS
19 #endif
20
21 #include "GBC.h"
22
23 using std::string;
24
25 namespace lyx {
26 namespace frontend {
27
28 GBC::GBC(ButtonController const & parent,
29          string const & cancel, string const & close)
30         : GuiBC<Gtk::Button, Gtk::Widget>(parent, cancel, close)
31 {
32 }
33
34
35 void GBC::setButtonEnabled(Gtk::Button * btn, bool enabled) const
36 {
37         btn->set_sensitive(enabled);
38 }
39
40
41 void GBC::setWidgetEnabled(Gtk::Widget * widget, bool enabled) const
42 {
43         widget->set_sensitive(enabled);
44 }
45
46
47 void GBC::setButtonLabel(Gtk::Button * btn, string const & label) const
48 {
49         // GTK+ Stock buttons take precedence
50         if (!btn->get_use_stock())
51                 btn->set_label(Glib::locale_to_utf8(label));
52 }
53
54 } // namespace frontend
55 } // namespace lyx