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
24 #include "ButtonControllerBase.h"
25 #include "ControlBibtex.h"
29 #include "BufferView.h"
31 #include "helper_funcs.h"
38 ControlBibtex::ControlBibtex(LyXView & lv, Dialogs & d)
39 : ControlCommand(lv, d)
41 d_.showBibtex.connect(slot(this, &ControlBibtex::showInset));
44 void ControlBibtex::applyParamsToInset()
46 if (params().getContents() != inset()->params().getContents())
47 lv_.view()->ChangeCitationsIfUnique(inset()->params().getContents(),
48 params().getContents());
50 inset()->setParams(params());
51 lv_.view()->updateInset(inset(), true);
53 // We need to do a redraw because the maximum
54 // InsetBibKey width could have changed
56 lv_.view()->fitCursor();
60 void ControlBibtex::applyParamsNoInset()
64 string const ControlBibtex::Browse(string const & in_name,
66 string const & pattern)
68 pair<string, string> dir1(N_("Documents|#o#O"), string(lyxrc.document_path));
69 return browseFile(&lv_, in_name, title, pattern, dir1);