1 /* This file is part of
2 * ======================================================
4 * LyX, The Document Processor
6 * Copyright 2001 The LyX Team.
8 * ======================================================
10 * \file ControlBibtex.C
11 * \author John Levon, moz@compsoc.man.ac.uk
12 * \author Angus Leeming <leeming@lyx.org>
13 * \author Herbert Voss <voss@lyx.org>
19 #pragma implementation
22 #include "ControlBibtex.h"
24 #include "BufferView.h"
26 #include "helper_funcs.h"
27 #include "tex_helpers.h"
29 #include "support/lstrings.h"
35 ControlBibtex::ControlBibtex(LyXView & lv, Dialogs & d)
36 : ControlCommand(lv, d)
41 void ControlBibtex::applyParamsToInset()
43 if (params().getContents() != inset()->params().getContents())
44 bufferview()->ChangeCitationsIfUnique(inset()->params().getContents(),
45 params().getContents());
47 inset()->setParams(params());
48 bufferview()->updateInset(inset(), true);
50 // We need to do a redraw because the maximum
51 // InsetBibKey width could have changed
52 #warning are you sure you need this repaint() ?
53 bufferview()->repaint();
54 bufferview()->fitCursor();
58 void ControlBibtex::applyParamsNoInset()
62 string const ControlBibtex::Browse(string const & in_name,
64 string const & pattern)
66 pair<string, string> dir1(_("Documents|#o#O"), string(lyxrc.document_path));
67 return browseRelFile(&lv_, in_name, buffer()->filePath(),
68 title, pattern, dir1);
72 string const ControlBibtex::getBibStyles() const
74 string list = getTexFileList("bstFiles.lst", false);
75 // test, if we have a valid list, otherwise run rescan
78 list = getTexFileList("bstFiles.lst", false);
84 void ControlBibtex::rescanBibStyles() const