]> git.lyx.org Git - features.git/blobdiff - src/frontends/qt2/QVCLog.C
Replace LString.h with support/std_string.h,
[features.git] / src / frontends / qt2 / QVCLog.C
index 59bdf1d661ba344a369b4b932c6ab4e4391f5357..bb40427d096ec5fe047e6915675e29a668974c8f 100644 (file)
@@ -1,33 +1,36 @@
 /**
  * \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 "support/std_sstream.h"
+#include "qt_helpers.h"
+#include "support/lstrings.h"
+#include "ControlVCLog.h"
 
-#include "QVCLogDialog.h"
 #include "QVCLog.h"
+#include "QVCLogDialog.h"
 #include "Qt2BC.h"
-#include "gettext.h"
 
-#include "QtLyXView.h"
-#include "ControlVCLog.h"
+#include <qtextview.h>
+#include <qpushbutton.h>
+
+
+using namespace lyx::support;
+
+typedef QController<ControlVCLog, QView<QVCLogDialog> > base_class;
 
-typedef Qt2CB<ControlVCLog, Qt2DB<QVCLogDialog> > base_class;
 
-QVCLog::QVCLog(ControlVCLog & c)
-       : base_class(c, _("VCLog"))
+QVCLog::QVCLog(Dialog & parent)
+       : base_class(parent, _("LyX: Version Control Log"))
 {
 }
 
@@ -36,17 +39,19 @@ void QVCLog::build_dialog()
 {
        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;
+       ostringstream ss;
+       controller().getVCLogFile(ss);
 
-       dialog_->vclogTV->setText(controller().getVCLogFile(ss).str().c_str());
+       dialog_->vclogTV->setText(toqstr(ss.str()));
 }