2 * \file ControlChanges.C
3 * This file is part of LyX, the document processor.
4 * Licence details can be found in the file COPYING.
8 * Full author contact details are available in file CREDITS
13 #include "ControlChanges.h"
15 #include "BufferView.h"
16 #include "funcrequest.h"
19 #include "support/lstrings.h"
22 ControlChanges::ControlChanges(Dialog & parent)
23 : Dialog::Controller(parent)
27 void ControlChanges::find()
29 lyxfind::findNextChange(kernel().bufferview());
33 string const ControlChanges::getChangeDate()
35 Change c(kernel().bufferview()->getCurrentChange());
36 if (c.type == Change::UNCHANGED || !c.changetime)
38 return ctime(&c.changetime);
42 string const ControlChanges::getChangeAuthor()
44 Change c(kernel().bufferview()->getCurrentChange());
45 if (c.type == Change::UNCHANGED)
48 Author const & a(kernel().buffer()->authors().get(c.author));
50 string author(a.name());
52 if (!a.email().empty()) {
54 author += a.email() + ")";
61 void ControlChanges::accept()
63 kernel().dispatch(FuncRequest(LFUN_ACCEPT_CHANGE));
64 lyxfind::findNextChange(kernel().bufferview());
68 void ControlChanges::reject()
70 kernel().dispatch(FuncRequest(LFUN_REJECT_CHANGE));
71 lyxfind::findNextChange(kernel().bufferview());