#include <config.h>
#include "ControlChanges.h"
+
+#include "author.h"
#include "buffer.h"
+#include "bufferparams.h"
#include "BufferView.h"
+#include "changes.h"
#include "funcrequest.h"
#include "lyxfind.h"
-#include "author.h"
-#include "support/lstrings.h"
+#include "support/lyxtime.h"
+
+using std::string;
+
+namespace lyx {
+
+namespace frontend {
-using namespace lyx::support;
ControlChanges::ControlChanges(Dialog & parent)
: Dialog::Controller(parent)
bool ControlChanges::find()
{
- return lyx::find::findNextChange(kernel().bufferview());
+ return find::findNextChange(kernel().bufferview());
}
if (c.type == Change::UNCHANGED || !c.changetime)
return string();
- // ctime adds newline; trim it off!
- string const date = rtrim(ctime(&c.changetime), "\n");
- return date;
+ return formatted_time(c.changetime);
}
if (c.type == Change::UNCHANGED)
return string();
- Author const & a(kernel().buffer().authors().get(c.author));
+ Author const & a(kernel().buffer().params().authors().get(c.author));
string author(a.name());
}
-void ControlChanges::accept()
+bool ControlChanges::accept()
{
kernel().dispatch(FuncRequest(LFUN_ACCEPT_CHANGE));
- lyx::find::findNextChange(kernel().bufferview());
+ return find::findNextChange(kernel().bufferview());
}
-void ControlChanges::reject()
+bool ControlChanges::reject()
{
kernel().dispatch(FuncRequest(LFUN_REJECT_CHANGE));
- lyx::find::findNextChange(kernel().bufferview());
+ return find::findNextChange(kernel().bufferview());
}
+
+
+} // namespace frontend
+} // namespace lyx