]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/xforms/FormBibtex.C
Yet more dialog tweaking from Rob.
[lyx.git] / src / frontends / xforms / FormBibtex.C
index 6ec95c50ebc115f272b73732dbecad0f83f37654..cf42a0742b9cb23f85f3e25a94bcf6741b04a45c 100644 (file)
@@ -1,11 +1,13 @@
 /**
  * \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__
@@ -36,8 +38,8 @@ using std::sort;
 
 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"))
 {}
 
 
@@ -116,10 +118,13 @@ ButtonPolicy::SMInput FormBibtex::input(FL_OBJECT * ob, long)
                }
        } 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());
+                               ChangeExtension(out_name, string()).c_str());
        } else if (ob == dialog_->button_rescan) {
                fl_clear_browser(dialog_->browser_styles);
                controller().rescanBibStyles();