]> git.lyx.org Git - lyx.git/blob - src/frontends/controllers/ControlBibtex.C
Move included files out of .h files and into .C files. Means that the
[lyx.git] / src / frontends / controllers / ControlBibtex.C
1 // -*- C++ -*-
2 /* This file is part of
3  * ====================================================== 
4  *
5  *           LyX, The Document Processor
6  *
7  *           Copyright 2001 The LyX Team.
8  *
9  * ======================================================
10  *
11  * \file ControlBibtex.C
12  * \author John Levon, moz@compsoc.man.ac.uk
13  * \author Angus Leeming <a.leeming@ic.ac.uk>
14  */
15
16 #include <algorithm>
17
18 #ifdef __GNUG__
19 #pragma implementation
20 #endif
21
22 #include <config.h>
23 #include "ViewBase.h"
24 #include "ButtonControllerBase.h"
25 #include "ControlBibtex.h"
26 #include "Dialogs.h"
27 #include "LyXView.h"
28 #include "buffer.h"
29
30 using SigC::slot;
31
32 ControlBibtex::ControlBibtex(LyXView & lv, Dialogs & d)
33         : ControlCommand(lv, d)
34 {
35         d_.showBibtex.connect(slot(this, &ControlBibtex::showInset));
36 }
37
38 void ControlBibtex::applyParamsToInset()
39 {
40         if (params().getContents() != inset()->params().getContents())
41                 lv_.view()->ChangeCitationsIfUnique(inset()->params().getContents(),
42                                                     params().getContents());
43
44         inset()->setParams(params());
45         lv_.view()->updateInset(inset(), true);
46
47         // We need to do a redraw because the maximum
48         // InsetBibKey width could have changed
49         lv_.view()->redraw();
50         lv_.view()->fitCursor(lv_.view()->getLyXText());
51 }
52
53
54 void ControlBibtex::applyParamsNoInset()
55 {}