]> git.lyx.org Git - lyx.git/blob - src/frontends/gtk/GBC.C
Change glob() API to accept a dir parameter.
[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 _GLIBCPP_CONCEPT_CHECKS
15 #undef _GLIBCPP_CONCEPT_CHECKS
16 #endif
17
18 #include "GBC.h"
19
20 using std::string;
21
22 namespace lyx {
23 namespace frontend {
24
25 GBC::GBC(ButtonController const & parent,
26          string const & cancel, string const & close)
27         : GuiBC<Gtk::Button, Gtk::Widget>(parent, cancel, close)
28 {
29 }
30
31
32 void GBC::setButtonEnabled(Gtk::Button * btn, bool enabled) const
33 {
34         btn->set_sensitive(enabled);
35 }
36
37
38 void GBC::setWidgetEnabled(Gtk::Widget * widget, bool enabled) const
39 {
40         widget->set_sensitive(enabled);
41 }
42
43
44 void GBC::setButtonLabel(Gtk::Button * btn, string const & label) const
45 {
46         // GTK+ Stock buttons take precedence
47         if (!btn->get_use_stock())
48                 btn->set_label(Glib::locale_to_utf8(label));
49 }
50
51 } // namespace frontend
52 } // namespace lyx