/**
* \file FormBibtex.C
- * Copyright 2001 the LyX Team
- * Read the file COPYING
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
*
- * \author Angus Leeming, a.leeming@ic.ac.uk
- * \author John Levon, moz@compsoc.man.ac.uk
- * \author Herbert Voss, voss@lyx.org
+ * \author Angus Leeming
+ * \author John Levon
+ * \author Herbert Voss
+ *
+ * Full author contact details are available in file CREDITS
*/
#ifdef __GNUG__
typedef FormCB<ControlBibtex, FormDB<FD_bibtex> > base_class;
-FormBibtex::FormBibtex(ControlBibtex & c, Dialogs & d)
- : base_class(c, d, _("BibTeX Database"))
+FormBibtex::FormBibtex()
+ : base_class(_("BibTeX Database"))
{}
}
} else if (ob == dialog_->button_style_choose) {
unsigned int selection = fl_get_browser(dialog_->browser_styles);
- string const out_name =
- fl_get_browser_line(dialog_->browser_styles, selection);
+ if (!selection)
+ return ButtonPolicy::SMI_NOOP;
+
+ string const out_name = fl_get_browser_line(dialog_->browser_styles,
+ selection);
fl_set_input(dialog_->input_style,
- ChangeExtension(out_name, string()).c_str());
- } else if (ob == dialog_->button_rescan)
+ ChangeExtension(out_name, string()).c_str());
+ } else if (ob == dialog_->button_rescan) {
+ fl_clear_browser(dialog_->browser_styles);
controller().rescanBibStyles();
+ string const str =
+ controller().getBibStyles();
+ fl_add_browser_line(dialog_->browser_styles, str.c_str());
+ }
// with an empty database nothing makes sense ...
if (!compare(fl_get_input(dialog_->input_database), "")) {
fl_set_button(dialog_->check_bibtotoc,0);
fl_set_input(dialog_->input_style, bibstyle.c_str());
}
+ fl_clear_browser(dialog_->browser_styles);
string const str =
controller().getBibStyles();
fl_add_browser_line(dialog_->browser_styles, str.c_str());