/**
* \file QVCLog.C
- * Copyright 2001 the LyX Team
- * Read the file COPYING
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
*
- * \author John Levon <moz@compsoc.man.ac.uk>
+ * \author John Levon
+ *
+ * Full author contact details are available in file CREDITS.
*/
#include <config.h>
-#include "Lsstream.h"
-#ifdef __GNUG__
-#pragma implementation
-#endif
-#include <qtextview.h>
-#include <qpushbutton.h>
-
-#include "QVCLogDialog.h"
+#include "support/std_sstream.h"
+#include "qt_helpers.h"
+#include "support/lstrings.h"
+#include "ControlVCLog.h"
+
#include "QVCLog.h"
+#include "QVCLogDialog.h"
#include "Qt2BC.h"
-#include "gettext.h"
-
-#include "QtLyXView.h"
-#include "ControlVCLog.h"
-typedef Qt2CB<ControlVCLog, Qt2DB<QVCLogDialog> > base_class;
+#include <qtextview.h>
+#include <qpushbutton.h>
+
+
+using namespace lyx::support;
-QVCLog::QVCLog(ControlVCLog & c)
- : base_class(c, _("VCLog"))
+typedef QController<ControlVCLog, QView<QVCLogDialog> > base_class;
+
+
+QVCLog::QVCLog(Dialog & parent)
+ : base_class(parent, _("LyX: Version Control Log"))
{
}
{
dialog_.reset(new QVCLogDialog(this));
- bc().setCancel(dialog_->closePB);
+ bcview().setCancel(dialog_->closePB);
}
void QVCLog::update_contents()
{
- dialog_->setCaption(string(_("Version control log for ") + controller().getBufferFileName()).c_str());
+ setTitle(bformat(_("Version control log for %1$s"),
+ controller().getBufferFileName()));
dialog_->vclogTV->setText("");
- stringstream ss;
-
- dialog_->vclogTV->setText(controller().getVCLogFile(ss).str().c_str());
+ ostringstream ss;
+ controller().getVCLogFile(ss);
+
+ dialog_->vclogTV->setText(toqstr(ss.str()));
}