]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/gtk/GTableCreate.C
Change glob() API to accept a dir parameter.
[lyx.git] / src / frontends / gtk / GTableCreate.C
index 1f6dff473851083019627be6c0485e7902a30f25..3405f602657dfd30709d2eaaea3d5d37a213d255 100644 (file)
@@ -9,26 +9,33 @@
  */
 
 #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;
@@ -38,20 +45,18 @@ void GTableCreate::doBuild()
        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