]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/xforms/FormBibtex.C
Introduce LFUN_PRINT.
[lyx.git] / src / frontends / xforms / FormBibtex.C
index 91fc14de2f7085ff871863fd97abd75c5af5cf93..71416187e1356669392e783a7089bb184adb3c63 100644 (file)
@@ -5,32 +5,41 @@
  *
  * \author Angus Leeming
  * \author John Levon
- * \author Herbert Voss
+ * \author Herbert Voß
  * \author Rob Lahaye
  *
- * Full author contact details are available in file CREDITS
+ * Full author contact details are available in file CREDITS.
  */
 
-
 #include <config.h>
-#include "xformsBC.h"
-#include "ControlBibtex.h"
+
 #include "FormBibtex.h"
+#include "ControlBibtex.h"
 #include "forms/form_bibtex.h"
+
 #include "Tooltips.h"
 #include "xforms_helpers.h"
-#include "lyx_forms.h"
+#include "xformsBC.h"
 
-#include "helper_funcs.h"
-#include "gettext.h"
-#include "support/lstrings.h"
 #include "support/filetools.h"
+#include "support/globbing.h"
+#include "support/lstrings.h"
 #include "support/lyxalgo.h"
 
-using namespace lyx::support;
+#include "lyx_forms.h"
+
+using lyx::support::ChangeExtension;
+using lyx::support::compare;
+using lyx::support::contains;
+using lyx::support::FileFilterList;
+using lyx::support::getStringFromVector;
+using lyx::support::getVectorFromString;
+using lyx::support::OnlyFilename;
+using lyx::support::prefixIs;
+using lyx::support::split;
 
 using std::vector;
-using std::sort;
+using std::string;
 
 
 typedef FormController<ControlBibtex, FormView<FD_bibtex> > base_class;
@@ -106,10 +115,11 @@ ButtonPolicy::SMInput FormBibtex::input(FL_OBJECT * ob, long ob_value)
        if (ob == dialog_->button_database_browse) {
                // When browsing, take the first file only
                string const in_name = getString(dialog_->input_database);
+               FileFilterList const
+                       filter(_("*.bib| BibTeX Databases (*.bib)"));
                string out_name =
-                       controller().Browse("",
-                               _("Select Database"),
-                               _("*.bib| BibTeX Databases (*.bib)"));
+                       controller().browse("", _("Select Database"),
+                                           filter);
                if (!out_name.empty()) {
                        // add the database to any existing ones
                        if (!in_name.empty())
@@ -120,9 +130,10 @@ ButtonPolicy::SMInput FormBibtex::input(FL_OBJECT * ob, long ob_value)
 
        } else if (ob == dialog_->button_style_browse) {
                string const in_name = getString(dialog_->input_style);
-               string const style = controller().Browse(in_name,
-                                       _("Select BibTeX-Style"),
-                                       _("*.bst| BibTeX Styles (*.bst)"));
+               FileFilterList const
+                       filter(_("*.bst| BibTeX Styles (*.bst)"));
+               string const style = controller()
+                       .browse(in_name, _("Select BibTeX-Style"), filter);
                if (!style.empty()) {
                        fl_set_input(dialog_->input_style, style.c_str());
                }