2 * \file ControlBibtex.C
3 * Read the file COPYING
6 * \author Angus Leeming
9 * Full author contact details are available in file CREDITS
15 #pragma implementation
18 #include "ControlBibtex.h"
20 #include "BufferView.h"
22 #include "helper_funcs.h"
23 #include "tex_helpers.h"
25 #include "support/lstrings.h"
31 ControlBibtex::ControlBibtex(LyXView & lv, Dialogs & d)
32 : ControlCommand(lv, d)
37 void ControlBibtex::applyParamsToInset()
39 if (params().getContents() != inset()->params().getContents())
40 bufferview()->ChangeCitationsIfUnique(inset()->params().getContents(),
41 params().getContents());
43 inset()->setParams(params());
44 bufferview()->updateInset(inset(), true);
46 // We need to do a redraw because the maximum
47 // InsetBibKey width could have changed
48 #warning are you sure you need this repaint() ?
49 bufferview()->repaint();
50 bufferview()->fitCursor();
54 void ControlBibtex::applyParamsNoInset()
58 string const ControlBibtex::Browse(string const & in_name,
60 string const & pattern)
62 pair<string, string> dir1(_("Documents|#o#O"), string(lyxrc.document_path));
63 return browseRelFile(&lv_, in_name, buffer()->filePath(),
64 title, pattern, dir1);
68 string const ControlBibtex::getBibStyles() const
70 string list = getTexFileList("bstFiles.lst", false);
71 // test, if we have a valid list, otherwise run rescan
74 list = getTexFileList("bstFiles.lst", false);
80 void ControlBibtex::rescanBibStyles() const