*
* \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;
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())
} 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());
}