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 <a.leeming@ic.ac.uk>
13 * \author Herbert Voss <voss@lyx.org>
19 #pragma implementation
22 #include "ControlBibtex.h"
23 #include "BufferView.h"
25 #include "helper_funcs.h"
28 #include "frontends/LyXView.h"
33 ControlBibtex::ControlBibtex(LyXView & lv, Dialogs & d)
34 : ControlCommand(lv, d)
38 void ControlBibtex::applyParamsToInset()
40 if (params().getContents() != inset()->params().getContents())
41 lv_.view()->ChangeCitationsIfUnique(inset()->params().getContents(),
42 params().getContents());
44 inset()->setParams(params());
45 lv_.view()->updateInset(inset(), true);
47 // We need to do a redraw because the maximum
48 // InsetBibKey width could have changed
50 lv_.view()->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, lv_.buffer()->filePath(),
64 title, pattern, dir1);