*/
#include <config.h>
-#include <gtkmm.h>
-#include <libglademm.h>
+// Too hard to make concept checks work with this file
+#ifdef _GLIBCPP_CONCEPT_CHECKS
+#undef _GLIBCPP_CONCEPT_CHECKS
+#endif
-#include "ControlTabularCreate.h"
#include "GTableCreate.h"
-#include "support/filetools.h"
+#include "ghelpers.h"
+
#include "support/lstrings.h"
+#include <libglademm.h>
+
using std::string;
+namespace lyx {
+namespace frontend {
+
GTableCreate::GTableCreate(Dialog & parent)
: GViewCB<ControlTabularCreate, GViewGladeB>(parent, _("Insert Table"))
{
}
+
void GTableCreate::doBuild()
{
- string const gladeName =
- lyx::support::LibFileSearch("glade", "tableCreate", "glade");
+ string const gladeName = findGladeFile("tableCreate");
xml_ = Gnome::Glade::Xml::create(gladeName);
Gtk::Button * ok;
Gtk::Button * apply;
xml_->get_widget("Cancel", cancel);
xml_->get_widget("Rows", rows_);
xml_->get_widget("Columns", columns_);
- bcview().setOK(ok);
- bcview().setCancel(cancel);
- bcview().setApply(apply);
- ok->signal_clicked().connect(
- SigC::slot(*this, &GViewBase::onOK));
- apply->signal_clicked().connect(
- SigC::slot(*this, &GViewBase::onApply));
- cancel->signal_clicked().connect(
- SigC::slot(*this, &GViewBase::onCancel));
+ setOK(ok);
+ setCancel(cancel);
+ setApply(apply);
}
+
void GTableCreate::apply()
{
- int rows = rows_->get_value_as_int();
- int columns = columns_->get_value_as_int();
+ int const rows = rows_->get_value_as_int();
+ int const columns = columns_->get_value_as_int();
controller().params() = std::make_pair(columns, rows);
}
+
+} // namespace frontend
+} // namespace lyx