]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/gtk/GMathDelim.C
Change glob() API to accept a dir parameter.
[lyx.git] / src / frontends / gtk / GMathDelim.C
index 0685bb07304bc719b6da461a50d34a45f30e3fd4..bf23037aa07191aac5a7ba94628e09993e99d3d7 100644 (file)
@@ -9,24 +9,36 @@
  */
 
 #include <config.h>
-#include <gtkmm.h>
-#include <libglademm.h>
-#include <sstream>
+
+// Too hard to make concept checks work with this file
+#ifdef _GLIBCPP_CONCEPT_CHECKS
+#undef _GLIBCPP_CONCEPT_CHECKS
+#endif
 
 #include "ControlMath.h"
 #include "GMathDelim.h"
-#include "support/filetools.h"
+#include "ghelpers.h"
+
 #include "support/lstrings.h"
+
+#include <libglademm.h>
+
+#include <sstream>
+
 #include "delim.xbm"
 #include "delim0.xpm"
 
 using std::string;
 
+namespace lyx {
+namespace frontend {
+
 namespace
 {
 
 enum enumDelimType {LEFT, RIGHT, SINGLE};
 
+
 int const delimType[] = {
        //row 1
        LEFT, RIGHT, LEFT, RIGHT, SINGLE, SINGLE, LEFT, RIGHT,LEFT, RIGHT,
@@ -36,11 +48,13 @@ int const delimType[] = {
        SINGLE
 };
 
+
 int const delimRevert[] = {
        1,0,3,2,4,5,7,6,9,8,10,11,
        13,12,15,14,16,17,19,18,20,21,22
 };
 
+
 char const * delimValues[] = {
        "(", ")", "lceil",  "rceil",  "uparrow",  "Uparrow",
        "[", "]", "lfloor", "rfloor", "updownarrow", "Updownarrow",
@@ -54,6 +68,7 @@ int const delimTblCols = 12;
 
 int const delimMax = 23;
 
+
 GXpmBtnTbl::XbmData xbm =
 {
        delim_bits,
@@ -62,16 +77,19 @@ GXpmBtnTbl::XbmData xbm =
        {0, 0, 0, 65535}
 };
 
+
 inline int index(int row, int col)
 {
        return row * delimTblCols + col;
 }
 
+
 inline int indexToRow(int index)
 {
        return index / delimTblCols;
 }
 
+
 inline int indexToCol(int index)
 {
        return index % delimTblCols;
@@ -79,6 +97,7 @@ inline int indexToCol(int index)
 
 }
 
+
 GMathDelim::GMathDelim(Dialog & parent) :
        GViewCB<ControlMath, GViewGladeB>(parent, _("Math Delimiters")),
        delimTbl_(delimTblRows, delimTblCols, xbm)
@@ -88,8 +107,7 @@ GMathDelim::GMathDelim(Dialog & parent) :
 
 void GMathDelim::doBuild()
 {
-       string const gladeName =
-               lyx::support::LibFileSearch("glade", "mathDelim", "glade");
+       string const gladeName = findGladeFile("mathDelim");
        xml_ = Gnome::Glade::Xml::create(gladeName);
        Gtk::Button * ok;
        Gtk::Button * apply;
@@ -111,7 +129,7 @@ void GMathDelim::doBuild()
        rightSel_ = 1;
        xml_->get_widget("Box", box);
        delimTbl_.signalClicked().connect(
-               SigC::slot(*this, &GMathDelim::onDelimTblClicked));
+               sigc::mem_fun(*this, &GMathDelim::onDelimTblClicked));
        delimTbl_.show();
        box->children().push_back(
                Gtk::Box_Helpers::Element(delimTbl_));
@@ -121,11 +139,11 @@ void GMathDelim::doBuild()
        bcview().addReadOnly(both_);
        bcview().addReadOnly(demo_);
        left_->signal_clicked().connect(
-               SigC::slot(*this, &GMathDelim::onRadioClicked));
+               sigc::mem_fun(*this, &GMathDelim::onRadioClicked));
        right_->signal_clicked().connect(
-               SigC::slot(*this, &GMathDelim::onRadioClicked));
+               sigc::mem_fun(*this, &GMathDelim::onRadioClicked));
        both_->signal_clicked().connect(
-               SigC::slot(*this, &GMathDelim::onRadioClicked));
+               sigc::mem_fun(*this, &GMathDelim::onRadioClicked));
 }
 
 
@@ -135,7 +153,7 @@ void GMathDelim::setDemoPixmap()
        pixmap_ = Gdk::Pixmap::create_from_xpm(demo_->get_colormap(),
                                               mask_,
                                               delim0);
-       image = SigC::manage(new Gtk::Image(pixmap_, mask_));
+       image = Gtk::manage(new Gtk::Image(pixmap_, mask_));
        image->show();
        demo_->add(*image);
        gcMask_ = Gdk::GC::create(mask_);
@@ -223,3 +241,6 @@ void GMathDelim::onRadioClicked()
 {
        bc().valid();
 }
+
+} // namespace frontend
+} // namespace lyx