]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/controllers/ControlBibtex.C
Switch from SigC signals to boost::signals
[lyx.git] / src / frontends / controllers / ControlBibtex.C
index 7da42cd5f8f8a4d571079a28bef3f81e324d57aa..22927cae4e3a5e251df3c38be6b82dd1ba6d8d3a 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of
- * ====================================================== 
+ * ======================================================
  *
  *           LyX, The Document Processor
  *
  * \file ControlBibtex.C
  * \author John Levon, moz@compsoc.man.ac.uk
  * \author Angus Leeming <a.leeming@ic.ac.uk>
+ * \author Herbert Voss <voss@lyx.org>
  */
 
-#include <algorithm>
+#include <config.h>
 
 #ifdef __GNUG__
 #pragma implementation
 #endif
 
-#include <config.h>
 #include "ViewBase.h"
 #include "ButtonControllerBase.h"
 #include "ControlBibtex.h"
 #include "Dialogs.h"
-#include "LyXView.h"
 #include "buffer.h"
 #include "BufferView.h"
+#include "lyxrc.h"
+#include "helper_funcs.h"
+#include "gettext.h"
+
+#include "frontends/LyXView.h"
+
+#include <boost/bind.hpp>
 
-using SigC::slot;
+#include <algorithm>
+
+using std::pair;
+using std::make_pair;
 
 ControlBibtex::ControlBibtex(LyXView & lv, Dialogs & d)
        : ControlCommand(lv, d)
 {
-       d_.showBibtex.connect(slot(this, &ControlBibtex::showInset));
+       d_.showBibtex = boost::bind(&ControlBibtex::showInset, this, _1);
 }
 
 void ControlBibtex::applyParamsToInset()
@@ -53,3 +62,13 @@ void ControlBibtex::applyParamsToInset()
 
 void ControlBibtex::applyParamsNoInset()
 {}
+
+
+string const ControlBibtex::Browse(string const & in_name,
+                                  string const & title,
+                                  string const & pattern)
+{
+       pair<string, string> dir1(_("Documents|#o#O"), string(lyxrc.document_path));
+       return browseRelFile(&lv_, in_name, lv_.buffer()->filePath(),
+                            title, pattern, dir1);
+}