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.
14 #include "support/std_sstream.h"
15 #include "qt_helpers.h"
16 #include "support/lstrings.h"
17 #include "ControlVCLog.h"
20 #include "QVCLogDialog.h"
23 #include <qtextview.h>
24 #include <qpushbutton.h>
26 using lyx::support::bformat;
28 using std::ostringstream;
31 typedef QController<ControlVCLog, QView<QVCLogDialog> > base_class;
33 QVCLog::QVCLog(Dialog & parent)
34 : base_class(parent, _("LyX: Version Control Log"))
39 void QVCLog::build_dialog()
41 dialog_.reset(new QVCLogDialog(this));
43 bcview().setCancel(dialog_->closePB);
47 void QVCLog::update_contents()
49 setTitle(bformat(_("Version control log for %1$s"),
50 controller().getBufferFileName()));
52 dialog_->vclogTV->setText("");
55 controller().getVCLogFile(ss);
57 dialog_->vclogTV->setText(toqstr(ss.str()));