]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/gtk/GUrl.C
Change glob() API to accept a dir parameter.
[lyx.git] / src / frontends / gtk / GUrl.C
index b02205994ad734d675c17c658f89210a108c9be0..dc0587d5546a36728a37a1f1cdcada4eea49ffe3 100644 (file)
@@ -9,17 +9,27 @@
  */
 
 #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 "ControlCommand.h"
 #include "GUrl.h"
-#include "support/filetools.h"
+#include "ghelpers.h"
+
 #include "support/lstrings.h"
 
+#include <gtkmm.h>
+#include <libglademm.h>
+
 using std::string;
 
+namespace lyx {
+namespace frontend {
+
+
 GUrl::GUrl(Dialog & parent)
        : GViewCB<ControlCommand, GViewGladeB>(parent, _("URL"))
 {
@@ -28,8 +38,7 @@ GUrl::GUrl(Dialog & parent)
 
 void GUrl::doBuild()
 {
-       string const gladeName =
-               lyx::support::LibFileSearch("glade", "url", "glade");
+       string const gladeName = findGladeFile("url");
        xml_ = Gnome::Glade::Xml::create(gladeName);
        Gtk::Button * restore;
        Gtk::Button * ok;
@@ -42,26 +51,18 @@ void GUrl::doBuild()
        xml_->get_widget("Ok", ok);
        xml_->get_widget("Apply", apply);
        xml_->get_widget("Cancel", cancel);
-       bcview().setOK(ok);
-       bcview().setCancel(cancel);
-       bcview().setApply(apply);
-       bcview().setRestore(restore);
+       setOK(ok);
+       setCancel(cancel);
+       setApply(apply);
+       setRestore(restore);
        bcview().addReadOnly(name_);
        bcview().addReadOnly(url_);
        bcview().addReadOnly(htmlType_);
 
-       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));
-       restore->signal_clicked().connect(
-               SigC::slot(*this, &GViewBase::onRestore));
        url_->signal_changed().connect(
-               SigC::slot(*this, &GUrl::onEntryChanged));
+               sigc::mem_fun(*this, &GUrl::onEntryChanged));
        name_->signal_changed().connect(
-               SigC::slot(*this, &GUrl::onEntryChanged));
+               sigc::mem_fun(*this, &GUrl::onEntryChanged));
 }
 
 
@@ -95,3 +96,6 @@ void GUrl::apply()
        else
                controller().params().setCmdName("url");
 }
+
+} // namespace frontend
+} // namespace lyx