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>
33 GBibItem::GBibItem(Dialog & parent)
34 : GViewCB<ControlCommand, GViewGladeB>(parent, lyx::to_utf8(_("Bibliography Entry Settings")), false)
38 void GBibItem::doBuild()
40 string const gladeName = findGladeFile("bibitem");
41 xml_ = Gnome::Glade::Xml::create(gladeName);
44 xml_->get_widget("Cancel", button);
46 xml_->get_widget("OK", button);
49 xml_->get_widget("Key", keyentry_);
50 xml_->get_widget("Label", labelentry_);
52 keyentry_->signal_changed().connect(
53 sigc::mem_fun(*this, &GBibItem::changed));
54 labelentry_->signal_changed().connect(
55 sigc::mem_fun(*this, &GBibItem::changed));
57 bcview().addReadOnly(keyentry_);
58 bcview().addReadOnly(labelentry_);
62 void GBibItem::update()
64 bc().refreshReadOnly();
66 keyentry_->set_text (controller().params().getContents());
67 labelentry_->set_text (controller().params().getOptions());
71 void GBibItem::apply()
73 controller().params().setContents(keyentry_->get_text());
74 controller().params().setOptions(labelentry_->get_text());
77 void GBibItem::changed()
79 if (keyentry_->get_text().size() > 0)
85 } // namespace frontend