2 * \file ControlBibtex.C
3 * This file is part of LyX, the document processor.
4 * Licence details can be found in the file COPYING.
7 * \author Angus Leeming
10 * Full author contact details are available in file CREDITS
16 #include "ControlBibtex.h"
18 #include "BufferView.h"
20 #include "helper_funcs.h"
21 #include "tex_helpers.h"
23 #include "support/lstrings.h"
29 ControlBibtex::ControlBibtex(LyXView & lv, Dialogs & d)
30 : ControlCommand(lv, d)
35 void ControlBibtex::applyParamsToInset()
37 if (params().getContents() != inset()->params().getContents())
38 bufferview()->ChangeCitationsIfUnique(inset()->params().getContents(),
39 params().getContents());
41 inset()->setParams(params());
42 bufferview()->updateInset(inset(), true);
44 // We need to do a redraw because the maximum
45 // InsetBibKey width could have changed
46 #warning are you sure you need this repaint() ?
47 bufferview()->repaint();
48 bufferview()->fitCursor();
52 void ControlBibtex::applyParamsNoInset()
56 string const ControlBibtex::Browse(string const & in_name,
58 string const & pattern)
60 pair<string, string> dir1(_("Documents|#o#O"),
61 string(lyxrc.document_path));
62 return browseRelFile(in_name, buffer()->filePath(),
63 title, pattern, false, dir1);
67 string const ControlBibtex::getBibStyles() const
69 string list = getTexFileList("bstFiles.lst", false);
70 // test, if we have a valid list, otherwise run rescan
73 list = getTexFileList("bstFiles.lst", false);
79 string const ControlBibtex::getBibFiles() const
81 string list = getTexFileList("bibFiles.lst", false);
82 // test, if we have a valid list, otherwise run rescan
85 list = getTexFileList("bibFiles.lst", false);
91 void ControlBibtex::rescanBibStyles() const