]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/controllers/ControlBibtex.C
The reference dialog now disconnects from the inset on Apply. Its behaviour
[lyx.git] / src / frontends / controllers / ControlBibtex.C
index 9cfa01fcf6eaccf7a5c23968bce79223b666c019..03b6dba6beaac3ada8e895a91960e8af23be4cc9 100644 (file)
@@ -10,6 +10,7 @@
  * \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 "LyXView.h"
 #include "buffer.h"
 #include "BufferView.h"
+#include "lyxrc.h"
+#include "helper_funcs.h"
+#include "gettext.h"
 
 using SigC::slot;
+using std::pair;
+using std::make_pair;
 
 ControlBibtex::ControlBibtex(LyXView & lv, Dialogs & d)
        : ControlCommand(lv, d)
@@ -47,9 +53,19 @@ void ControlBibtex::applyParamsToInset()
        // We need to do a redraw because the maximum
        // InsetBibKey width could have changed
        lv_.view()->redraw();
-       lv_.view()->fitCursor(lv_.view()->getLyXText());
+       lv_.view()->fitCursor();
 }
 
 
 void ControlBibtex::applyParamsNoInset()
 {}
+
+
+string const ControlBibtex::Browse(string const & in_name, 
+                                   string const & title,
+                                  string const & pattern)
+{
+       pair<string, string> dir1(N_("Documents"), string(lyxrc.document_path));
+       return browseFile(&lv_, in_name, title, pattern, 
+                         dir1,make_pair(string(), string()));
+}