]> git.lyx.org Git - features.git/blobdiff - src/frontends/qt2/QLog.C
Replace LString.h with support/std_string.h,
[features.git] / src / frontends / qt2 / QLog.C
index 4018ef82371d85f22f7b34b20df04921cf2d9b02..ce55736dfd8ce6293a6839707e5d75107439abca 100644 (file)
@@ -5,19 +5,15 @@
  *
  * \author John Levon
  *
- * Full author contact details are available in file CREDITS
+ * Full author contact details are available in file CREDITS.
  */
 
 #include <config.h>
 
-#ifdef __GNUG__
-#pragma implementation
-#endif
 
-#include "LyXView.h"
-#include "gettext.h"
+#include "qt_helpers.h"
 #include "ControlLog.h"
-#include "Lsstream.h"
+#include "support/std_sstream.h"
 
 #include <qtextview.h>
 #include <qpushbutton.h>
 using std::ifstream;
 using std::getline;
 
-typedef Qt2CB<ControlLog, Qt2DB<QLogDialog> > base_class;
+typedef QController<ControlLog, QView<QLogDialog> > base_class;
 
-QLog::QLog()
-       : base_class(_("Log"))
+QLog::QLog(Dialog & parent)
+       : base_class(parent, _("LyX: LaTeX Log"))
 {
 }
 
@@ -43,7 +39,7 @@ void QLog::build_dialog()
 {
        dialog_.reset(new QLogDialog(this));
 
-       bc().setCancel(dialog_->closePB);
+       bcview().setCancel(dialog_->closePB);
 }
 
 
@@ -53,23 +49,23 @@ void QLog::update_contents()
                controller().logfile();
 
        if (logfile.first == Buffer::buildlog)
-               dialog_->setCaption(_("Build log"));
+               setTitle(_("Build log"));
        else
-               dialog_->setCaption(_("LaTeX log"));
+               setTitle(_("LaTeX log"));
 
        dialog_->logTV->setText("");
 
        ifstream ifstr(logfile.second.c_str());
        if (!ifstr) {
                if (logfile.first == Buffer::buildlog)
-                       dialog_->logTV->setText(_("No build log file found"));
+                       dialog_->logTV->setText(qt_("No build log file found."));
                else
-                       dialog_->logTV->setText(_("No LaTeX log file found"));
+                       dialog_->logTV->setText(qt_("No LaTeX log file found."));
                return;
        }
 
        ostringstream ost;
        ost << ifstr.rdbuf();
 
-       dialog_->logTV->setText(ost.str().c_str());
+       dialog_->logTV->setText(toqstr(ost.str()));
 }