3 * This file is part of LyX, the document processor.
4 * Licence details can be found in the file COPYING.
8 * Full author contact details are available in file CREDITS.
13 // Too hard to make concept checks work with this file
14 #ifdef _GLIBCXX_CONCEPT_CHECKS
15 #undef _GLIBCXX_CONCEPT_CHECKS
17 #ifdef _GLIBCPP_CONCEPT_CHECKS
18 #undef _GLIBCPP_CONCEPT_CHECKS
22 #include "ControlCommand.h"
25 #include <libglademm.h>
32 GBibItem::GBibItem(Dialog & parent)
33 : GViewCB<ControlCommand, GViewGladeB>(parent, _("Bibliography Entry Settings"), false)
37 void GBibItem::doBuild()
39 string const gladeName = findGladeFile("bibitem");
40 xml_ = Gnome::Glade::Xml::create(gladeName);
43 xml_->get_widget("Cancel", button);
45 xml_->get_widget("OK", button);
48 xml_->get_widget("Key", keyentry_);
49 xml_->get_widget("Label", labelentry_);
51 keyentry_->signal_changed().connect(
52 sigc::mem_fun(*this, &GBibItem::changed));
53 labelentry_->signal_changed().connect(
54 sigc::mem_fun(*this, &GBibItem::changed));
56 bcview().addReadOnly(keyentry_);
57 bcview().addReadOnly(labelentry_);
61 void GBibItem::update()
63 bc().refreshReadOnly();
65 keyentry_->set_text (controller().params().getContents());
66 labelentry_->set_text (controller().params().getOptions());
70 void GBibItem::apply()
72 controller().params().setContents(keyentry_->get_text());
73 controller().params().setOptions(labelentry_->get_text());
76 void GBibItem::changed()
78 if (keyentry_->get_text().size() > 0)
84 } // namespace frontend