3 * Copyright 2001 the LyX Team
4 * Read the file COPYING
13 #include "ControlLog.h"
20 FormLog::FormLog(ControlLog & c)
21 : KFormBase<ControlLog, LogDialog>(c)
26 void FormLog::update()
28 std::pair<Buffer::LogType, string> const logfile = controller().logfile();
30 if (logfile.first == Buffer::buildlog)
31 dialog_->setCaption(_("Build log"));
33 dialog_->setCaption(_("LaTeX log"));
35 dialog_->setLogText("");
37 ifstream ifstr(logfile.second.c_str());
39 if (logfile.first == Buffer::buildlog)
40 dialog_->setLogText(_("No build log file found"));
42 dialog_->setLogText(_("No LaTeX log file found"));
49 while (getline(ifstr, line))
52 dialog_->setLogText(text);
58 dialog_.reset(new LogDialog(this, 0, _("LyX: LaTeX Log")));
60 bc().setCancel(dialog_->button_cancel);